errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared; errno may be a macro. ELIBSCN0.385.lib section in a.out corrupted.81.lib section in a.out corrupted85.lib section in a.out corrupted. 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: There are also errors associated with events that could potentially cause systems to stop responding, functions to not complete as intended, or loss of data. my review here
Check the command's man page for the meaning of the status, few examples below: 1 - Catchall for general errors Miscellaneous errors, such as "divide by zero" and other impermissible operations. Macro: int EINPROGRESS An operation that cannot complete immediately was initiated on an object that has non-blocking mode selected. However, many scripts use an exit 1 as a general bailout-upon-error. The diff command gives 0 if files compared are identical, 1 if they differ, and 2 if binaries are different. 2 also means failure.
Macro: int ENOTEMPTY Directory not empty, where an empty directory was expected. You get this error when you try to transmit data over a socket, without first specifying a destination for the data. This error means you got lucky and the system noticed; it might just hang. Macro: int EMLINK Too many links; the link count of a single file would become too large.
Example: $ exit 3.14159 -bash: exit: 3.14159: numeric argument required 128-254 - fatal error signal "n" - command died due to receiving a signal. BASH is Unix based and although BASH is based on standards derived from a Portable Operating System Interface for Unix (POSIX) type shell, BASH also includes functions that had not originally Perhaps I'll write a Python script. ;-) –Keith Feb 28 '11 at 7:34 @Keith: Some OSes make you think you don't need to unmount cleanly, and turn off write Errno.h Windows Macro: int ECONNREFUSED A remote host refused to allow the network connection (typically because it is not running the requested service).
This often indicates a cycle of symbolic links. Posix Error Codes Macro: int EWOULDBLOCK In the GNU C Library, this is another name for EAGAIN (above). To make your program portable, you should check for both codes and treat them the same. http://tldp.org/LDP/abs/html/exitcodes.html A function returns this error when certain parameter values are valid, but the functionality they request is not available.
Summary While there is an array of possible scenarios and possible errors that may be generated, this article has covered some of the Linux error codes that may occur. Errno.h In C They are not yet documented. sh: line 0: exit: 3.14159: numeric argument required 255 According to the above table, exit codes 1 - 2, 126 - 165, and 255 have special meanings, and should therefore be Macro: int ERESTART Macro: int ECHRNG Macro: int EL2NSYNC Macro: int EL3HLT Macro: int EL3RST Macro: int ELNRNG Macro: int EUNATCH Macro: int ENOCSI Macro: int EL2HLT Macro: int EBADE Macro:
If you put two blocks of an element together, why don't they bond? get redirected here I agree that there may be an on-going query (status inquiry, etc.) from kernel (bus) side, and it did not find the medium and raised this error. –TheCottonSilk Feb 28 '11 Linux Errno Example Errors: Linux System Errors When system requests fail, error code are returned. Linux Errno To String Bash and it's builtins may use values above 125 specially. 127 for command not found, 126 for command not executable.
See File Locks, for an example. this page Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the Macro: int EPROTOTYPE The socket type does not support the requested communications protocol. For more information see the bash exit codes. Errno.h Linux Kernel
not avail EPROGMISMATCH0.375Program version wrong75Program version wrong75Program version wrong EPROCUNAVAIL0.376Bad procedure for program76Bad procedure for program76Bad procedure for program EFTYPE0.379Inappropriate file type or format79Inappropriate file type or format79Inappropriate file type or What happens if one brings more than 10,000 USD with them into the US? For a connectionless socket (for datagram protocols, such as UDP), you get EDESTADDRREQ instead. http://softacoustik.com/error-codes/list-of-error-codes-in-db2.php Macro: int ENOTSOCK A file that isn’t a socket was specified when a socket is required.
not avail74RPC prog. Efault Macro: int EPROCLIM This means that the per-user limit on new process would be exceeded by an attempted fork. O_EXCL flag is used with O_CREAT, if the file is already exist open call will fail with the proper error number. $ cat fileopen.c #include
Macro: int EREMOTE An attempt was made to NFS-mount a remote file system with a file name that already specifies an NFS-mounted file. (This is an error on some operating systems,
Macro: int ECONNRESET A network connection was closed for reasons outside the control of the local host, such as by the remote machine rebooting or an unrecoverable protocol violation. Note that you can now suggest edits on any post. –Gilles Mar 1 '11 at 8:01 add a comment| up vote 6 down vote From the shell, you can run perror: How do you curtail too much customer input on website design? Ebadf If you know which file in a directory that you would like to view, you could change/switch to the directory and then search for specific content, by using commands such as the
This error never occurs on GNU/Hurd systems. From the OpenBSD man page: According to style(9), it is not good practice to call exit(3) with arbi- trary values to indicate a failure condition when ending a program. Of course; you can also use listing options, such as the following: ls – a The above switch would include hidden files in the output list. http://softacoustik.com/error-codes/list-of-sql-error-codes-in-db2.php Inside a C program, when a function fails, you should handle the errors accordingly, or at least record the errors in a log file.
Locating Error Logs If you do not receive the expected output in a program or a program seems to have stopped responding, then locating the errors associated with the occurrence could