Error Code errno Guide

Source: Internet
Author: User
Tags connection reset
<Div class = "motadou_spec_line"> 0 -- locate errno. H </div>
I want to see the content of errno. H. How do I know where it is? <Br/>
<Br/>
<Strong> Method 1: Search for errno. h. Command: Find/-name errno. H </strong>
<PRE class = "pre_style"> Find/-name errno. h
/Usr/include/ASM/errno. h
/Usr/include/ASM-generic/errno. h
/Usr/include/bits/errno. h
/Usr/include/errno. h
/Usr/include/Linux/errno. h
/Usr/include/sys/errno. h
</PRE>
Errno. h can be found. If you do not know the header file used by GCC, you need to make further judgments before confirmation.
<Br/>
<Br/>
<Strong> Method 2: view the search path of the header file during GCC compilation to determine the directory of errno. h. Command: gcc-V test. cpp </strong>
<PRE class = "pre_style"> GCC version 4.1.0 (SuSE Linux)
/Usr/lib/GCC/i586-suse-linux/4.1.0/cc1plus-quiet-v-d_gnu_source test. CPP-quiet-dumpbase test. CPP-mtune = generic-auxbase test-version-o/tmp/ccxnnd7y. s
# Include "..." search starts here:
# Include & lt;... & gt; search starts here:
/Usr/include/C ++/4.1.0
/Usr/include/C ++/4.1.0/i586-suse-linux
/Usr/include/C ++/4.1.0/backward
/Usr/local/include
/Usr/lib/GCC/i586-suse-linux/4.1.0/include
/Usr/lib/GCC/i586-suse-linux/4.1.0/http://www.cnblogs.com/http://www.cnblogs.com/i586-suse-linux/include
/Usr/include
End of search list.
</PRE>
The header file search path is listed above. Based on the file list obtained by the first method, the location of errno. h can be located.
<Br/>
<Br/>
The location of errno. h on my machine is: <br/>
/Usr/include/ASM-generic/errno-base.h <br/>
/Usr/include/ASM-generic/errno. H <br/>
<Div class = "motadou_spec_line"> 1 -- View errno instructions directly </div>
We can use "Man errno" to directly view the definition of errno, or use "man-a errno | col-B & gt; errno. man. <Br/>
<PRE class = "pre_style"> man-a errno | col-B & gt; errno. Man
Reformatting errno (3), please wait...
Reformatting errno (3 P), please wait...
Reformatting errno (3), please wait...
Reformatting errno. H (0 p), please wait...
</PRE>
<Div class = "motadou_spec_line"> 2 -- parsing the value and meaning of errno </div>
File:/usr/include/ASM-generic/errno-base.h
<PRE class = "pre_style"> # ifndef _ asm_generic_errno_base_h
# DEFINE _ asm_generic_errno_base_h
# Defineeperm 1/* operation not permitted */
# Defineenoent 2/* no such file or directory */
# Defineesrch 3/* no such process */
# Defineeintr 4/* interrupted system call */
# Defineeio 5/* I/O Error */
# Defineenxio 6/* no such device or address */
# Definee2big 7/* argument list too long */
# Defineenoexec 8/* exec format Error */
# Defineebadf 9/* Bad file number */
# Defineechild 10/* No Child processes */
# Defineeagain 11/* try again */
# Defineenomem 12/* out of memory */
# Defineeacces 13/* permission denied */
# Defineefault 14/* Bad address */
# Defineenotblk 15/* block device required */
# Defineebusy 16/* device or resource busy */
# Defineeexist 17/* file exists */
# Defineexdev 18/* cross-device link */
# Defineenodev 19/* no such device */
# Defineenotdir 20/* not a directory */
# Defineeisdir 21/* is a directory */
# Defineeinval 22/* invalid argument */
# Defineenfile 23/* file table overflow */
# Defineemfile 24/* too program open files */
# Defineenotty 25/* not a typewriter */
# Defineetxtbsy 26/* Text File busy */
# Defineefbig 27/* file too large */
# Defineenospc 28/* no space left on device */
# Defineespipe 29/* illegal seek */
# Defineerofs 30/* read-only file system */
# Defineemlink 31/* too many links */
# Defineepipe 32/* broken pipe */
# Defineedom 33/* Math argument out of domain of func */
# Defineerange 34/* Math result not representable */
# Endif
</PRE>
<Br/>
<Br/>
File:/usr/include/ASM-generic/errno. h
<PRE class = "pre_style"> # ifndef _ asm_generic_errno_h
# DEFINE _ asm_generic_errno_h
# Include & lt; ASM-generic/errno-base.h & gt;
# Defineedeadlk 35/* Resource deadlock wocould occur */
# Defineenametoolong36/* File Name Too Long */
# Defineenolck 37/* No record locks available */
# Defineenosys 38/* function not implemented */
# Defineenotempty39/* directory not empty */
# Defineeloop 40/* too define symbolic links encountered */
# Defineewouldblockeagain/* operation wo'd block */
# Defineenomsg 42/* No message of desired type */
# Defineeidrm 43/* identifier removed */
# Defineechrng 44/* channel number out of range */
# Defineel2nsync45/* level 2 not synchronized */
# Defineel3hlt 46/* level 3 halted */
# Defineel3rst 47/* level 3 reset */
# Defineelnrng 48/* Link number out of range */
# Defineeunatch 49/* protocol driver not attached */
# Defineenocsi 50/* No CSI structure available */
# Defineel2hlt 51/* level 2 halted */
# Defineebade 52/* invalid exchange */
# Defineebadr 53/* invalid request descriptor */
# Defineexfull 54/* exchange full */
# Defineenoano 55/* No anode */
# Defineebadrqc 56/* invalid request code */
# Defineebadslt 57/* invalid slot */
# Defineedeadlockedeadlk
# Defineebfont 59/* bad font file format */
# Defineenostr 60/* device not a stream */
# Defineenodata 61/* No data available */
# Defineetime 62/* timer expired */
# Defineenosr 63/* Out of streams Resources */
# Defineenonet 64/* machine is not on the Network */
# Defineenopkg 65/* package not installed */
# Defineeremote 66/* object is remote */
# Defineenolink 67/* link has been severed */
# Defineeadv 68/* advertise Error */
# Defineesrmnt 69/* srmount Error */
# Defineecomm 70/* communication error on send */
# Defineeproto 71/* Protocol Error */
# Defineemulti21372/* multihop attempted */
# Defineedotdot 73/* RFS specific error */
# Defineebadmsg 74/* not a data message */
# Defineeoverflow75/* value too large for defined data type */
# Defineenotuniq76/* name not unique on Network */
# Defineebadfd 77/* file descriptor in bad state */
# Defineeremchg 78/* remote address changed */
# Defineelibacc 79/* can not access a needed shared library */
# Defineelibbad 80/* accessing a specified upted shared library */
# Defineelibscn 81/*. Lib section in A. Out writable upted */
# Defineelibmax 82/* attempting to link in too functions shared libraries */
# Defineelibexec83/* cannot exec a shared library directly */
# Defineeilseq 84/* illegal byte sequence */
# Defineerestart85/* interrupted System Call shoshould be restarted */
# Defineestrpipe86/* streams pipe Error */
# Defineeusers 87/* too kerberusers */
# Defineenotsock88/* socket operation on Non-socket */
# Defineedestaddrreq89/* destination address required */
# Defineemsgsize90/* message too long */
# Defineeprototype91/* protocol wrong type for socket */
# Defineenoprotoopt92/* protocol not available */
# Defineeprotonosupp93 93/* protocol not supported */
# Defineesocktnosupp94 94/* socket type not supported */
# Defineeopnotsupp95/* operation not supported on transport endpoint */
# Defineepfnosupp96 96/* protocol family not supported */
# Defineeafnosupport97/* address family not supported by Protocol */
# Defineeaddrinuse98/* address already in use */
# Defineeaddrnotavail99/* cannot assign requested address */
# Defineenetdown100/* network is down */
# Defineenetunreach101/* network is unreachable */
# Defineenetreset102/* network dropped connection because of Reset */
# Defineeconnaborted103/* software caused connection abort */
# Defineeconnreset104/* Connection reset by peer */
# Defineenobufs 105/* No buffer space available */
# Defineeisconn 106/* transport endpoint is already connected */
# Defineenotconn107/* transport endpoint is not connected */
# Defineeshudown108/* cannot send after transport endpoint shutdown */
# Definepolicmanyrefs109/* too limit references: cannot splice */
# Defineetimedout110/* connection timed out */
# Defineeconnrefused111/* connection refused */
# Defineehostdown112/* Host is down */
# Defineehostunreach113/* No route to host */
# Defineealready114/* operation already in progress */
# Defineeinprogress115/* operation now in progress */
# Defineestale 116/* stale NFS file handle */
# Defineeuclean 117/* structure needs cleaning */
# Defineenotnam 118/* Not a xenix named type file */
# Defineenavail 119/* No XENIX semaphores available */
# Defineeisnam 120/* is a named type file */
# Defineeremoteio121/* remote I/O Error */
# Defineedquot 122/* Quota exceeded */
# Defineenomedium123/* No medium found */
# Defineemediumtype124/* wrong medium type */
# Defineecanceled125/* operation canceled */
# Defineenokey 126/* required key not available */
# Defineekeyexpired127/* Key has expired */
# Defineekeyrevoked128/* key has been revoked */
# Defineekeyrejected129/* key was rejected by service */
/* For robust mutexes */
# Defineeownerdead130/* owner died */
# Defineenotrecoverable131/* State not recoverable */
# Endif
</PRE>
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.