.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .TH ERRNO 3 "21 July 1996" "" "Library functions" .SH NAME errno \- number of last error .SH SYNOPSIS #include .sp extern int errno; .SH DESCRIPTION The integer .B errno is set by system calls (and some library functions) to indicate what went wrong. Its value is significant only when the call returned an error (usually \-1), and a library function that does succeed is allowed to change .BR errno . Sometimes, when \-1 is also a legal return value one has to zero .B errno before the call in order to detect possible errors. POSIX lists the following symbolic error names. .TP .B E2BIG Arg list too long .TP .B EACCES Permission denied .TP .B EAGAIN Resource temporarily unavailable .TP .B EBADF Bad file descriptor .TP .B EBUSY Resource busy .TP .B ECHILD No child processes .TP .B EDEADLK Resource deadlock avoided .TP .B EDOM Domain error .TP .B EEXIST File exists .TP .B EFAULT Bad address .TP .B EFBIG File too large .TP .B EINTR Interrupted function call .TP .B EINVAL Invalid argument .TP .B EIO Input/output error .TP .B EISDIR Is a directory .TP .B EMFILE Too many open files .TP .B EMLINK Too many links .TP .B ENAMETOOLONG Filename too long .TP .B ENFILE Too many open files in system .TP .B ENODEV No such device .TP .B ENOENT No such file or directory .TP .B ENOEXEC Exec format error .TP .B ENOLCK No locks available .TP .B ENOMEM Not enough space .TP .B ENOSPC No space left on device .TP .B ENOSYS Function not implemented .TP .B ENOTDIR Not a directory .TP .B ENOTEMPTY Directory not empty .TP .B ENOTTY Inappropriate I/O control operation .TP .B ENXIO No such device or address .TP .B EPERM Operation not permitted .TP .B EPIPE Broken pipe .TP .B ERANGE Result too large .TP .B EROFS Read-only file system .TP .B ESPIPE Invalid seek .TP .B ESRCH No such process .TP .B EXDEV Improper link .SH "SEE ALSO" .BR perror (3)