Linux System Call Error Codes

In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system’s kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API). It provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls.

The below list gives the system call error codes. This can be useful in interpreting the command output while using linux debugging tool like strace.

E2BIGArgument list too long (POSIX.1)
EACCESPermission denied (POSIX.1)
EADDRINUSEAddress already in use (POSIX.1)
EADDRNOTAVAILAddress not available (POSIX.1)
EAFNOSUPPORTAddress family not supported (POSIX.1)
EAGAINResource temporarily unavailable (may be the same value as EWOULDBLOCK) (POSIX.1)
EALREADYConnection already in progress (POSIX.1)
EBADEInvalid exchange
EBADFBad file descriptor (POSIX.1)
EBADFDFile descriptor in bad state
EBADMSGBad message (POSIX.1)
EBADRInvalid request descriptor
EBADRQCInvalid request code
EBADSLTInvalid slot
EBUSYDevice or resource busy (POSIX.1)
ECANCELEDOperation canceled (POSIX.1)
ECHILDNo child processes (POSIX.1)
ECHRNGChannel number out of range
ECOMMCommunication error on send
ECONNABORTEDConnection aborted (POSIX.1)
ECONNREFUSEDConnection refused (POSIX.1)
ECONNRESETConnection reset (POSIX.1)
EDEADLKResource deadlock avoided (POSIX.1)
EDESTADDRREQDestination address required (POSIX.1)
EDOMMathematics argument out of domain of function (POSIX.1, C99)
EDQUOTDisk quota exceeded (POSIX.1)
EEXISTFile exists (POSIX.1)
EFAULTBad address (POSIX.1)
EFBIGFile too large (POSIX.1)
EHOSTDOWNHost is down
EHOSTUNREACHHost is unreachable (POSIX.1)
EIDRMIdentifier removed (POSIX.1)
EILSEQIllegal byte sequence (POSIX.1, C99)
EINPROGRESSOperation in progress (POSIX.1)
EINTRInterrupted function call (POSIX.1); see signal(7).
EINVALInvalid argument (POSIX.1)
EIOInput/output error (POSIX.1)
EISCONNSocket is connected (POSIX.1)
EISDIRIs a directory (POSIX.1)
EISNAMIs a named type file
EKEYEXPIREDKey has expired
EKEYREJECTEDKey was rejected by service
EKEYREVOKEDKey has been revoked
EL2HLTLevel 2 halted
EL2NSYNCLevel 2 not synchronized
EL3HLTLevel 3 halted
EL3RSTLevel 3 halted
ELIBACCCannot access a needed shared library
ELIBBADAccessing a corrupted shared library
ELIBMAXAttempting to link in too many shared libraries
ELIBSCNlib section in a.out corrupted
ELIBEXECCannot exec a shared library directly
ELOOPToo many levels of symbolic links (POSIX.1)
EMEDIUMTYPEWrong medium type
EMFILEToo many open files (POSIX.1)
EMLINKToo many links (POSIX.1)
EMSGSIZEMessage too long (POSIX.1)
EMULTIHOPMultihop attempted (POSIX.1)
ENAMETOOLONGFilename too long (POSIX.1)
ENETDOWNNetwork is down (POSIX.1)
ENETRESETConnection aborted by network (POSIX.1)
ENETUNREACHNetwork unreachable (POSIX.1)
ENFILEToo many open files in system (POSIX.1)
ENOBUFSNo buffer space available (POSIX.1 (XSI STREAMS option))
ENODATANo message is available on the STREAM head read queue (POSIX.1)
ENODEVNo such device (POSIX.1)
ENOENTNo such file or directory (POSIX.1)
ENOEXECExec format error (POSIX.1)
ENOKEYRequired key not available
ENOLCKNo locks available (POSIX.1)
ENOLINKLink has been severed (POSIX.1)
ENOMEDIUMNo medium found
ENOMEMNot enough space (POSIX.1)
ENOMSGNo message of the desired type (POSIX.1)
ENONETMachine is not on the network
ENOPKGPackage not installed
ENOPROTOOPTProtocol not available (POSIX.1)
ENOSPCNo space left on device (POSIX.1)
ENOSRNo STREAM resources (POSIX.1 (XSI STREAMS option))
ENOSYSFunction not implemented (POSIX.1)
ENOTBLKBlock device required
ENOTCONNThe socket is not connected (POSIX.1)
ENOTDIRNot a directory (POSIX.1)
ENOTEMPTYDirectory not empty (POSIX.1)
ENOTSOCKNot a socket (POSIX.1)
ENOTSUPOperation not supported (POSIX.1)
ENOTTYInappropriate I/O control operation (POSIX.1)
ENOTUNIQName not unique on network
ENXIONo such device or address (POSIX.1)
EOPNOTSUPPOperation not supported on socket (POSIX.1)
(ENOTSUP and EOPNOTSUPP have the same value on Linux, but according to POSIX.1 these error values should be distinct.)
EOVERFLOWValue too large to be stored in data type (POSIX.1)
EPERMOperation not permitted (POSIX.1)
EPFNOSUPPORTProtocol family not supported
EPIPEBroken pipe (POSIX.1)
EPROTOProtocol error (POSIX.1)
EPROTONOSUPPORTProtocol not supported (POSIX.1)
EPROTOTYPEProtocol wrong type for socket (POSIX.1)
ERANGEResult too large (POSIX.1, C99)
EREMCHGRemote address changed
EREMOTEObject is remote
EREMOTEIORemote I/O error
ERESTARTInterrupted system call should be restarted
EROFSRead-only file system (POSIX.1)
ESHUTDOWNCannot send after transport endpoint shutdown
ESPIPEInvalid seek (POSIX.1)
ESOCKTNOSUPPORTSocket type not supported
ESRCHNo such process (POSIX.1)
ESTALEStale file handle (POSIX.1)
This error can occur for NFS and for other file systems
ESTRPIPEStreams pipe error
ETIMEStale file handle (POSIX.1)
This error can occur for NFS and for other file systems
ETIMEDOUTConnection timed out (POSIX.1)
ETXTBSYText file busy (POSIX.1)
EUCLEANStructure needs cleaning
EUNATCHProtocol driver not attached
EUSERSToo many users
EWOULDBLOCKOperation would block (may be same value as EAGAIN) (POSIX.1)
EXDEVImproper link (POSIX.1)
EXFULLExchange full

Leave a Reply

Your email address will not be published.