Nerveware


Linux exit signals

From the signal manual: `man 7 signal`.

linux supports the standard signals listed below. Several signal numbers are architecture-dependent, as indicated in the "Value" column. (Where three values are given, the first one is usually valid for alpha and sparc, the middle one for x86, arm, and most other architectures, and the last one for mips. (Values for parisc are not shown; see the Linux kernel source for signal numbering on that architecture.) A dash (-) denotes that a signal is absent on the corresponding architecture. First the signals described in the original POSIX.1-1990 standard. Signal Value Action Comment ────────────────────────────────────────────────────────────────────── SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGILL 4 Core Illegal Instruction SIGABRT 6 Core Abort signal from abort(3) SIGFPE 8 Core Floating-point exception SIGKILL 9 Term Kill signal, cannot be caught, blocked or ignored SIGSEGV 11 Core Invalid memory reference SIGPIPE 13 Term Broken pipe: write to pipe with no readers; see pipe(7) SIGALRM 14 Term Timer signal from alarm(2) SIGTERM 15 Term Termination signal SIGUSR1 30,10,16 Term User-defined signal 1 SIGUSR2 31,12,17 Term User-defined signal 2 SIGCHLD 20,17,18 Ign Child stopped or terminated SIGCONT 19,18,25 Cont Continue if stopped SIGSTOP 17,19,23 Stop Stop process, cannot be caught, blocked or ignored SIGTSTP 18,20,24 Stop Stop typed at terminal SIGTTIN 21,21,26 Stop Terminal input for background process SIGTTOU 22,22,27 Stop Terminal output for background process Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001. Signal Value Action Comment ──────────────────────────────────────────────────────────────────── SIGBUS 10,7,10 Core Bus error (bad memory access) SIGPOLL Term Pollable event (Sys V). Synonym for SIGIO SIGPROF 27,27,29 Term Profiling timer expired SIGSYS 12,31,12 Core Bad system call (SVr4); see also seccomp(2) SIGTRAP 5 Core Trace/breakpoint trap SIGURG 16,23,21 Ign Urgent condition on socket (4.2BSD) SIGVTALRM 26,26,28 Term Virtual alarm clock (4.2BSD) SIGXCPU 24,24,30 Core CPU time limit exceeded (4.2BSD); see setrlimit(2) SIGXFSZ 25,25,31 Core File size limit exceeded (4.2BSD); see setrlimit(2) Up to and including Linux 2.2, the default behavior for SIGSYS, SIGXCPU, SIGXFSZ, and (on architectures other than SPARC and MIPS) SIGBUS was to terminate the process (without a core dump). (On some other UNIX systems the default action for SIGXCPU and SIGXFSZ is to terminate the process without a core dump.) Linux 2.4 conforms to the POSIX.1-2001 requirements for these signals, terminating the process with a core dump. Next various other signals. Signal Value Action Comment ──────────────────────────────────────────────────────────────────── SIGIOT 6 Core IOT trap. A synonym for SIGABRT SIGEMT 7,-,7 Term Emulator trap SIGSTKFLT -,16,- Term Stack fault on coprocessor (unused) SIGIO 23,29,22 Term I/O now possible (4.2BSD) SIGCLD -,-,18 Ign A synonym for SIGCHLD SIGPWR 29,30,19 Term Power failure (System V) SIGINFO 29,-,- A synonym for SIGPWR SIGLOST -,-,- Term File lock lost (unused) SIGWINCH 28,28,20 Ign Window resize signal (4.3BSD, Sun) SIGUNUSED -,31,- Core Synonymous with SIGSYS (Signal 29 is SIGINFO / SIGPWR on an alpha but SIGLOST on a sparc.) SIGEMT is not specified in POSIX.1-2001, but nevertheless appears on most other UNIX systems, where its default action is typically to terminate the process with a core dump. SIGPWR (which is not specified in POSIX.1-2001) is typically ignored by default on those other UNIX systems where it appears. SIGIO (which is not specified in POSIX.1-2001) is ignored by default on several other UNIX systems. Where defined, SIGUNUSED is synonymous with SIGSYS on most architectures.

Linux error codes

From include/uapi/asm-generic/errno-base.h, include/uapi/asm-generic/errno.h, and include/linux/errno.h in the Linux 4.19 kernel.

Definition Value Description
EPERM1Operation not permitted
ENOENT2No such file or directory
ESRCH3No such process
EINTR4Interrupted system call
EIO5I/O error
ENXIO6No such device or address
E2BIG7Argument list too long
ENOEXEC8Exec format error
EBADF9Bad file number
ECHILD10No child processes
EAGAIN11Try again
ENOMEM12Out of memory
EACCES13Permission denied
EFAULT14Bad address
ENOTBLK15Block device required
EBUSY16Device or resource busy
EEXIST17File exists
EXDEV18Cross-device link
ENODEV19No such device
ENOTDIR20Not a directory
EISDIR21Is a directory
EINVAL22Invalid argument
ENFILE23File table overflow
EMFILE24Too many open files
ENOTTY25Not a typewriter
ETXTBSY26Text file busy
EFBIG27File too large
ENOSPC28No space left on device
ESPIPE29Illegal seek
EROFS30Read-only file system
EMLINK31Too many links
EPIPE32Broken pipe
EDOM33Math argument out of domain of func
ERANGE34Math result not representable
EDEADLK35Resource deadlock would occur
ENAMETOOLONG36File name too long
ENOLCK37No record locks available
ENOSYS38Invalid system call number
ENOTEMPTY39Directory not empty
ELOOP40Too many symbolic links encountered
EWOULDBLOCKEAGAINOperation would block
ENOMSG42No message of desired type
EIDRM43Identifier removed
ECHRNG44Channel number out of range
EL2NSYNC45Level 2 not synchronized
EL3HLT46Level 3 halted
EL3RST47Level 3 reset
ELNRNG48Link number out of range
EUNATCH49Protocol driver not attached
ENOCSI50No CSI structure available
EL2HLT51Level 2 halted
EBADE52Invalid exchange
EBADR53Invalid request descriptor
EXFULL54Exchange full
ENOANO55No anode
EBADRQC56Invalid request code
EBADSLT57Invalid slot
EDEADLOCKEDEADLK
EBFONT59Bad font file format
ENOSTR60Device not a stream
ENODATA61No data available
ETIME62Timer expired
ENOSR63Out of streams resources
ENONET64Machine is not on the network
ENOPKG65Package not installed
EREMOTE66Object is remote
ENOLINK67Link has been severed
EADV68Advertise error
ESRMNT69Srmount error
ECOMM70Communication error on send
EPROTO71Protocol error
EMULTIHOP72Multihop attempted
EDOTDOT73RFS specific error
EBADMSG74Not a data message
EOVERFLOW75Value too large for defined data type
ENOTUNIQ76Name not unique on network
EBADFD77File descriptor in bad state
EREMCHG78Remote address changed
ELIBACC79Can not access a needed shared library
ELIBBAD80Accessing a corrupted shared library
ELIBSCN81.lib section in a.out corrupted
ELIBMAX82Attempting to link in too many shared libraries
ELIBEXEC83Cannot exec a shared library directly
EILSEQ84Illegal byte sequence
ERESTART85Interrupted system call should be restarted
ESTRPIPE86Streams pipe error
EUSERS87Too many users
ENOTSOCK88Socket operation on non-socket
EDESTADDRREQ89Destination address required
EMSGSIZE90Message too long
EPROTOTYPE91Protocol wrong type for socket
ENOPROTOOPT92Protocol not available
EPROTONOSUPPORT93Protocol not supported
ESOCKTNOSUPPORT94Socket type not supported
EOPNOTSUPP95Operation not supported on transport endpoint
EPFNOSUPPORT96Protocol family not supported
EAFNOSUPPORT97Address family not supported by protocol
EADDRINUSE98Address already in use
EADDRNOTAVAIL99Cannot assign requested address
ENETDOWN100Network is down
ENETUNREACH101Network is unreachable
ENETRESET102Network dropped connection because of reset
ECONNABORTED103Software caused connection abort
ECONNRESET104Connection reset by peer
ENOBUFS105No buffer space available
EISCONN106Transport endpoint is already connected
ENOTCONN107Transport endpoint is not connected
ESHUTDOWN108Cannot send after transport endpoint shutdown
ETOOMANYREFS109Too many references: cannot splice
ETIMEDOUT110Connection timed out
ECONNREFUSED111Connection refused
EHOSTDOWN112Host is down
EHOSTUNREACH113No route to host
EALREADY114Operation already in progress
EINPROGRESS115Operation now in progress
ESTALE116Stale file handle
EUCLEAN117Structure needs cleaning
ENOTNAM118Not a XENIX named type file
ENAVAIL119No XENIX semaphores available
EISNAM120Is a named type file
EREMOTEIO121Remote I/O error
EDQUOT122Quota exceeded
ENOMEDIUM123No medium found
EMEDIUMTYPE124Wrong medium type
ECANCELED125Operation Canceled
ENOKEY126Required key not available
EKEYEXPIRED127Key has expired
EKEYREVOKED128Key has been revoked
EKEYREJECTED129Key was rejected by service
EOWNERDEAD130Owner died
ENOTRECOVERABLE131State not recoverable
ERFKILL132Operation not possible due to RF-kill
EHWPOISON133Memory page has hardware error
ERESTARTSYS512
ERESTARTNOINTR513
ERESTARTNOHAND514restart if no handler..
ENOIOCTLCMD515No ioctl command
EOPENSTALE518open found a stale dentry
EBADHANDLE521Illegal NFS file handle
ENOTSYNC522Update synchronization mismatch
EBADCOOKIE523Cookie is stale
ENOTSUPP524Operation is not supported
ETOOSMALL525Buffer or request is too small
ESERVERFAULT526An untranslatable error occurred
EBADTYPE527Type not supported by server
EJUKEBOX528Request initiated, but will not complete before timeout
EIOCBQUEUED529iocb queued, will get completion event
ERECALLCONFLICT530conflict with recalled state