errno.00 is:success errno.01 is:operation not permitted errno.02 is:no such file or directory errno.03 is:no such proc ESS errno.04 is:interrupted system call errno.05 is:input/output error errno.06 is:no such device or address errno.07 I
S:argument
/usr/include/asm-generic/errno-base.h
/usr/include/asm-generic/errno.h
You can obtain an error description using the following procedure:
Strerror (errno): Get errno corresponding error
/**************************** Get error code description ****
Errno. H --
Query
Checking the error code errno is an important way to debug the program. When the linuc c api function is abnormal, The errno variable (including
Errno. h) assign an integer. Different values indicate different meanings. You can
1, using a small program output all the errno corresponding error string, the code is as follows#include void ShowError (int err){printf ("errno:%5d, Error:%s\n", err, strerror (err));}void Showallerr (){int i = 0;for (; i {ShowError (i);}}int main (
strerror (int error): For printing error
errno.00 is:success errno.01 is:operation not permittederrno.02 is:no such file or directoryerrno.03 Is:no Such processerrno.04 is:interrupted System callerrno.05 is:input/output Errorerrno.06 Is:no such
#include
#include
#include
int main (int argc, char * * argv)
{
int i = 0;
for (i = 0; i {
printf ("errno.%0 2d is:%s\n ", I, strerror (i));
}
return 0;
}
errno.00 is:successerrno.01 Is:operation not permittederrno.02 is:no such file or
The errno definition in Linux. In the header file # include
124 emediumtype wrong medium type
123 enomedium no medium found
122 edquot Disk Quota exceeded
121 eremoteio remote I/O Error
120 eisnam is a named type file
119 enavail no XENIX
What is socket
A socket interface is an API of a TCP/IP network. A socket interface defines many functions or routines. programmers can use it to develop applications on a TCP/IP network. To learn TCP/IP network programming on the internet, you
What is a socketThe socket interface is a TCP/IP network Api,socket interface that defines many functions or routines that programmers can use to develop applications on a TCP/IP network. To learn about TCP/IP network programming on the Internet,
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.