Pegasus InfoCorp: Web site design and web software development company

ERRNO (3)

number of last error

SYNOPSIS

    #include <errno.h> extern int errno;

DESCRIPTION

    The integer 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 errno .

    Sometimes, when -1 is also a legal return value one has to zero errno before the call in order to detect possible errors.

    errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared; errno may be a macro. errno is thread-local; setting it in one thread does not affect its value in any other thread.

    Valid error numbers are all non-zero; errno is never set to zero by any library function. All the error names specified by POSIX.1 must have distinct values.

    POSIX.1 (1996 edition) lists the following symbolic error names. Of these, EDOM and ERANGE are in the ISO C standard. ISO C Amendment 1 defines the additional error number EILSEQ for coding errors in multibyte or wide characters.

    E2BIG

      Arg list too long

    EACCES

      Permission denied

    EAGAIN

      Resource temporarily unavailable

    EBADF

      Bad file descriptor

    EBADMSG

      Bad message

    EBUSY

      Resource busy

    ECANCELED

      Operation canceled

    ECHILD

      No child processes

    EDEADLK

      Resource deadlock avoided

    EDOM

      Domain error

    EEXIST

      File exists

    EFAULT

      Bad address

    EFBIG

      File too large

    EINPROGRESS

      Operation in progress

    EINTR

      Interrupted function call

    EINVAL

      Invalid argument

    EIO

      Input/output error

    EISDIR

      Is a directory

    EMFILE

      Too many open files

    EMLINK

      Too many links

    EMSGSIZE

      Inappropriate message buffer length

    ENAMETOOLONG

      Filename too long

    ENFILE

      Too many open files in system

    ENODEV

      No such device

    ENOENT

      No such file or directory

    ENOEXEC

      Exec format error

    ENOLCK

      No locks available

    ENOMEM

      Not enough space

    ENOSPC

      No space left on device

    ENOSYS

      Function not implemented

    ENOTDIR

      Not a directory

    ENOTEMPTY

      Directory not empty

    ENOTSUP

      Not supported

    ENOTTY

      Inappropriate I/O control operation

    ENXIO

      No such device or address

    EPERM

      Operation not permitted

    EPIPE

      Broken pipe

    ERANGE

      Result too large

    EROFS

      Read-only file system

    ESPIPE

      Invalid seek

    ESRCH

      No such process

    ETIMEDOUT

      Operation timed out

    EXDEV

      Improper link

    Many other error numbers are returned by various Unix implementations. System V returns ETXTBSY (Text file busy) if one tries to exec() a file that is currently open for writing. Linux also returns this error if one tries to have a file both memory mapped with VM_DENYWRITE and open for writing.

SEE ALSO

    - perror (3) - - strerror (3) - ' " ' " Copyright(c) 1989-1993 The Regents of the University of California ' " Copyright(c) 1994-1997 Sun Microsystems Inc ' " ' " See the file "license terms" for information on usage and redistribution ' " of this file and for a DISCLAIMER OF ALL WARRANTIES ' " ' " RCS: @(#) $Id: Eval (3) v 1 2 1998/09/14 18:39:48 stanton Exp $ ' " ' " The definitions below are for supplemental macros used in Tcl/Tk ' " manual entries ' " ' " AP type name in/out ?indent? ' " Start paragraph describing an argument to a library procedure ' " type is type of argument(int etc ) in/out is either "in" "out" ' " or "in/out" to describe whether procedure reads or modifies arg ' " and indent is equivalent to second arg of IP(shouldn't ever be ' " needed; use AS below instead) ' " ' " AS ?type? ?name? ' " Give maximum sizes of arguments for setting tab stops Type and ' " name are examples of largest possible arguments that will be passed ' " to AP later If args are omitted default tab stops are used ' " ' " BS ' " Start box enclosure From here until next BE everything will be ' " enclosed in one large box ' " ' " BE ' " End of box enclosure ' " ' " CS ' " Begin code excerpt ' " ' " CE ' " End code excerpt ' " ' " VS ?version? ?br? ' " Begin vertical sidebar for use in marking newly-changed parts ' " of man pages The first argument is ignored and used for recording ' " the version when the VS was added so that the sidebars can be ' " found and removed when they reach a certain age If another argument ' " is present then a line break is forced before starting the sidebar ' " ' " VE ' " End of vertical sidebar ' " ' " DS ' " Begin an indented unfilled display ' " ' " DE ' " End of indented unfilled display ' " ' " SO ' " Start of list of standard options for a Tk widget The ' " options follow on successive lines in four columns separated ' " by tabs ' " ' " SE ' " End of list of standard options for a Tk widget ' " ' " OP cmdName dbName dbClass ' " Start of description of a specific option cmdName gives the ' " option's name as specified in the class command dbName gives ' " the option's name in the option database and dbClass gives ' " the option's class in the option database ' " ' " UL arg1 arg2 ' " Print arg1 underlined then print arg2 normally ' " ' " RCS: @(#) $Id: man macros v 1 2 1998/09/14 18:39:54 stanton Exp $ ' " ' " # Set up traps and other miscellaneous stuff for Tcl/Tk man pages t wh -1 3i ^B ^l n( l b ' " # Start an argument description AP !" $4"" TP $4 { !" $2"" TP n()Cu 15