Docs are worthless like this. –Someone Somewhere Sep 2 '11 at 5:52 4 @SomeoneSomewhere That's a feature, not a bug. Feel free to send those people a nice peer beating. –allyourcode Nov 25 '12 at 7:06 3 The problem is that perror doesn't tell you which macro equivalent the error This would allot 50 valid codes, and make troubleshooting scripts more straightforward.  All user-defined exit codes in the accompanying examples to this document conform to this standard, except Converting Game of Life images to lists Players Characters don't meet the fundamental requirements for campaign Specific word to describe someone who is so good that isn't even considered in say navigate to this website
If you have any doubts, take it straight from the horse’s mouth: mm/mmap.c:do_mmap(). Exit Codes With Special MeaningsTable E-1. This should not cause any problems, since there is no overlap or conflict in usage of exit codes between compiled C/C++ binaries and shell scripts.PrevHomeMore hints
Macro: int ETIMEDOUT A socket operation with a specified timeout received no response during the timeout period. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed According to this: http://linux.die.net/man/2/socket the function returns -1 on failure, and sets errno to the appropriate error number. For example, if you try to delete a file that is the root of a currently mounted filesystem, you get this error.
E2BIG Argument list too long (POSIX.1) EACCES Permission denied (POSIX.1) EADDRINUSE Address already in use (POSIX.1) EADDRNOTAVAIL Address not available (POSIX.1) EAFNOSUPPORT Address family not supported (POSIX.1) EAGAIN Resource temporarily unavailable Macro: int EIEIO Go home and have a glass of warm, dairy-fresh milk. You get this error when you try to transmit data over a connectionless socket, without first specifying a destination for the data with connect. Errno.h Windows Macro: int EISCONN You tried to connect a socket that is already connected.
On x86-64, any address with the most significant bit set (i.e. Macro: int EBADMSG Macro: int EIDRM Macro: int EMULTIHOP Macro: int ENODATA Macro: int ENOLINK Macro: int ENOMSG Macro: int ENOSR Macro: int ENOSTR Macro: int EOVERFLOW Macro: int EPROTO Macro: Macro: int EIO Input/output error; usually used for physical read or write errors. http://man7.org/linux/man-pages/man3/errno.3.html Every library function that returns this error code also generates a SIGPIPE signal; this signal terminates the program if not handled or blocked.
Macro: int ERPCMISMATCH ??? Errno.h In C Macro: int ENXIO No such device or address. Why is JK Rowling considered 'bad at math'? This article shows all available error numbers along with it descriptions.
Macro: int ECHILD There are no child processes. This indicates an internal confusion in the file system which is due to file system rearrangements on the server host for NFS file systems or corruption in other file systems. Linux Errno Example Fast, does not rely on a recompilation, and works (nearly) everywhere, including on old machine where errno.h is not available. Linux Errno To String cc perror.c -o perror << use this line to compile it share|improve this answer edited Nov 8 '12 at 0:35 Troy Alford 16.9k84668 answered Nov 1 '11 at 19:19 Johan Snowgoose
A function returns this error when certain parameter values are valid, but the functionality they request is not available. http://softacoustik.com/linux-errno/linux-error-22.php After I inserted/did file io/removed a SD combo card, I got following errors: mmcblk0: error -123 sending status command mmcblk0: error -123 sending read/write command, response 0x0, card status 0x0 mmcblk0: In C programming language, there is an external variable called "errno". In GNU, this error is always synonymous with ENOMEM; you may get one or the other from network operations. Errno.h Linux Kernel
share|improve this answer edited Feb 28 '11 at 21:40 answered Feb 28 '11 at 21:24 Mikel 29k768100 perror(1)? Attempts to manipulate the object before the call completes return EALREADY. The kernel rightfully has nothing to do with it. my review here The file was the wrong type for the operation, or a data file had the wrong format.
fork can return this error. Efault share|improve this answer edited Feb 18 '15 at 0:07 Peter Mortensen 10.3k1369107 answered Feb 2 '09 at 16:50 Otávio Décio 54.2k9124189 add a comment| up vote 0 down vote When you What is the meaning of the so-called "pregnant chad"?
Duplicate descriptors do count toward this limit. Macro: int EPROGUNAVAIL ??? What value is "EIO"? Ebadf In next execution, it throws an error number 17, which is "File already exist".
Equation which has to be solved with logarithms Publishing a mathematical research article on research which is already done? Macro: int EPFNOSUPPORT The socket communications protocol family you requested is not supported. You can convert an errno value to a useful string with the strerror function. get redirected here Macro: int ENOSYS Function not implemented.
Instead it would just exit the program. However, many scripts use an exit 1 as a general bailout-upon-error. Did you unmount it before removing it? Then if for example you want to get the description of error type 2, just type errno 2 in the terminal.
UNIX is a registered trademark of The Open Group. Typically, this error occurs when you are trying to delete a directory. Thanks! Can't a user change his session information to impersonate others?
Caution, this is not thread- or interrupt-safe; it is free to rewrite the string and return the same pointer on the next invocation. You can use perror in stdio.h to print an error message based on the value of errno or you can use strerror in string.h to access a string describing the error Macro: int EHOSTDOWN The remote host for a requested network connection is down. Macro: int ENEEDAUTH ???
Macro: int EINPROGRESS An operation that cannot complete immediately was initiated on an object that has non-blocking mode selected. You can also simply drop me a line to say hello!. rename can cause this error if the file being renamed already has as many links as it can take (see Renaming Files). An exit value greater than 255 returns an exit code modulo 256.
Macro: int ECONNABORTED A network connection was aborted locally.