Intro(S) 6 January 1993 Intro(S) Name Intro - introduce system services, library routines, and error numbers Description This manual page describes all system services and error values. In addition, this manual page provides listings of obsolete and withdrawn system services. System services include all library routines or system calls that are available in the operating system kernel. Standards conformance Many of the system services listed in section (S) conform to one or more of the following standards: Standard Latest Revision ___________________________________________________________________________ NIST FIPS National Institute of Standards and Technology (NIST), Federal Information Processing Standard, 151-1 POSIX IEEE 1003.1 andISO/IEC 9945-1, First Edition 1990-12-07 SVID Issue 2, Select Code 307-127 XPG3 X/Open Portability Guide, XSI System Interface and Headers, December 1988 Intel Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2) XPG3 withdrawn routines The X/Open Portability Guide, Issue 3 (XPG3), has been revised so that previously supported system services have now been withdrawn. To main- tain portability with future issues of these standards, use of these ser- vices is not recommended. Specifying the cc ... -xpg3 command causes the withdrawn routines to not be included in the output object. The following system services have been withdrawn from XPG3: acct getutent nl_cxtime setpgrp brk getutid nl_fprintf setpwent catgetmsg getutline nl_fscanf setutent ecvt gsignal nl_init ssignal edata ioctl nl_printf stime end l3tol nl_scanf sync endgrent lockf nl_sprintf sys_errlist endpwent logname nl_sscanf sys_nerr endutent ltol3 nl_strcmp ttyslot etext mallinfo nl_strncmp umount fcvt mallopt plock ustat fgetgrent matherr profil utmpname fgetpwent mknod ptrace gcvt mktemp putpwent getgrent monitor pututline getpw mount sbrk getpwent nl_ascxtime setgrent In addition, the following header files are also withdrawn: malloc.h sys/acct.h termio.h memory.h sys/dirent.h ustat.h mon.h sys/lock.h utmp.h Obsolete routines The following routines are no longer described in section (S). In all cases, the routines were documented, but did not have equivalent source code in the Development System. The routines are: Routine Manual Page ____________________________________________________________ agetnum authcap(S) ascftime ctime(S) cftime ctime(S) check_basic_data_structures check_basic_data_structures(S) db_lock dblock(S) db_unlock dblock(S) discr_check_file discr(S) ensure_db_lock dblock(S) ensure_discr_file discr(S) ensure_e_ids discr(S) file_lock dblock(S) file_unlock dblock(S) get_discr_file discr(S) getprcment getprcment(S) getprcmnam getprcment(S) putprcmnam getprcment(S) read_cm_fields fields(S) running_secure fields(S) setchrclass ctype(S) setprcment getprcment(S) store_cm_fields fields(S) Because of the removal of these routines, the checkbasicdatastructures(S), dblock(S), discr(S), and getprcment(S) manual pages have been entirely removed. Error values Most services that are part of the operating system kernel have one or more error returns. An error condition is indicated by a value returned by each function, for example, -1 for functions returning an integer. The individual manual pages specify details. An error number is also made available in the external variable errno. errno is not cleared on suc- cessful calls, so it should be tested only after an error has been indi- cated. Each of the tables in this section list errors numerically. After the tables, alphabetic information is provided about each error. The following table lists error values defined in /usr/include/sys/errno.h (any error number that is not listed in this table is reserved): 1 EPERM 31 EMLINK 66 EREMOTE 2 ENOENT 32 EPIPE 67 ENOLINK 3 ESRCH 33 EDOM 68 EADV 4 EINTR 34 ERANGE 69 ESRMNT 5 EIO 35 ENOMSG 70 ECOMM 6 ENXIO 36 EIDRM 71 EPROTO 7 E2BIG 37 ECHRNG 74 EMULTIHOP 8 ENOEXEC 38 EL2NSYNC 75 ELBIN 9 EBADF 39 EL3HLT 76 EDOTDOT 10 ECHILD 40 EL3RST 77 EBADMSG 11 EAGAIN 41 ELNRNG 78 ENAMETOOLONG 12 ENOMEM 42 EUNATCH 80 ENOTUNIQ 13 EACCES 43 ENOCSI 81 EBADFD 14 EFAULT 44 EL2HLT 82 EREMCHG 15 ENOTBLK 45 EDEADLK 83 ELIBACC 16 EBUSY 46 ENOLCK 84 ELIBBAD 17 EEXIST 50 EBADE 85 ELIBSCN 18 EXDEV 51 EBADR 86 ELIBMAX 19 ENODEV 52 EXFULL 87 ELIBEXEC 20 ENOTDIR 53 ENOANO 89 ENOSYS 21 EISDIR 54 EBADRQC 90 TCPERR 22 EINVAL 55 EBADSLT 135 EUCLEAN 23 ENFILE 56 EDEADLOCK 137 ENOTNAM 24 EMFILE 57 EBFONT 138 ENAVAIL 25 ENOTTY 60 ENOSTR 139 EISNAM 26 ETXTBSY 61 ENODATA 140 EREMOTEIO 27 EFBIG 62 ETIME 141 EINIT 28 ENOSPC 63 ENOSR 142 EREMDEV 29 ESPIPE 64 ENONET 145 ENOTEMPTY 30 EROFS 65 ENOPKG 150 ELOOP ISAM errors The following table lists ISAM error values found in the /usr/include/isam.h file: 100 EDUPL 108 EKEXISTS 116 EBADMEM 101 ENOTOPEN 109 EPRIMKEY 117 EBADCOLL 102 EBADARG 110 EENDFILE 118 EPKDUP 103 EBADKEY 111 ENOREC 119 EBADTX 104 ETOOMANY 112 ENOCURR 120 ETXLCK 105 EBADFILE 113 EFLOCKED 121 EJOURNAL 106 ENOTEXCL 114 EFNAME 122 ENOLOCK 107 ELOCKED 115 ENOLOK STREAMS TCP errors The following table lists STREAMS TCP errors defined in /usr/include/sys/errno.h: 63 ENOBUFS 99 EOPNOTSUPP 110 EISCONN 90 EWOULDBLOCK 100 EPFNOSUPPORT 111 ENOTCONN 91 EINPROGRESS 101 EAFNOSUPPORT 112 ESHUTDOWN 92 EALREADY 102 EADDRINUSE 113 ETOOMANYREFS 93 ENOTSOCK 103 EADDRNOTAVAIL 114 ETIMEDOUT 94 EDESTADDRREQ 104 ENETDOWN 115 ECONNREFUSED 95 EMSGSIZE 105 ENETUNREACH 116 EHOSTDOWN 96 EPROTOTYPE 106 ENETRESET 117 EHOSTUNREACH 97 EPROTONOSUPPORT 107 ECONNABORTED 118 ENOPROTOOPT 98 ESOCKTNOSUPPORT 108 ECONNRESET Message catalog errors The following table lists message catalog error values that are defined in /usr/include/nls/i_errno.h: -1 I_ERROR 7 I_EICNV 14 I_EIBNV 1 I_EBACC 8 I_EISTI 15 I_EREAD 2 I_EBADF 9 I_EISTR 16 I_ENMSG 3 I_ENMEM 10 I_EIDOC 17 I_EBADC 4 I_EINTL 11 I_EICTM 18 I_ENOOP 5 I_EIPRP 12 I_EICPR 6 I_EICOL 13 I_EICSC TLI and XTI errors The functions in the network services library return error values to the terrno variable rather than errno. Both TLI and XTI have error codes with the same names and functions, except XTI has additional error codes- TNOSTRUCTYPE, TBADNAME, TBADQLEN and TADDRBUSY. The TLI error codes are defined in /usr/include/sys/tiuser.h; the XTI error codes are defined in /usr/include/xti.h. The error code values are listed in the following table and their meanings are described in the alphabetic listing in the next section: 1 TBADADDR 9 TLOOK 17 TNOREL 2 TBADOPT 10 TBADDATA 18 TNOTSUPPORT 3 TACCES 11 TBUFOVFLW 19 TSTATECHNG 4 TBADF 12 TFLOW 20 TNOSTRUCTYPE (XTI only) 5 TNOADDR 13 TNODATA 21 TBADNAME (XTI only) 6 TOUTSTATE 14 TNODIS 22 TBADQLEN (XTI only) 7 TBADSEQ 15 TNOUDERR 23 TADDRBUSY (XTI only) 8 TSYSERR 16 TBADFLAG Error descriptions The following alphabetically sorted list provides more information on each value defined in the previous error value tables: E2BIG Arg list too long: An argument list longer than 5,120 bytes is presented to a member of the exec family. E2NSYNC Level 2 not synchronized EACCES Permission denied: An attempt was made to access a file in a way forbidden by the protection system. EADDRINUSE Address already in use EADDRNOTAVAIL Cannot assign requested address EADV Advertise error: This error is RFS-specific. It occurs when users try to advertise a resource that has been advertised already, or try to stop the RFS while there are resources still adver- tised, or try to force unmount a resource when it is still advertised. EAFNOSUPPORT Address family not supported by protocol family EAGAIN No more processes: A fork failed because the system's process table is full or the user is not allowed to create any more processes. EALREADY Operation already in progress EBADARG Bad argument: One of the ISAM call's arguments is outside the range of allowable values for that argument. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EBADCOLL Bad ISAM collating EBADE Bad exchange descriptor EBADF Bad file number: A file descriptor refers to no open file, a read request is made to a file that is open only for writing, or a write request is made to a file only open for reading. EBADFD File descriptor in bad state EBADFILE Bad file: The format of an ISAM file has been damaged. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EBADKEY Bad key: At least one of the elements of an ISAM index key descrip- tion is not within the range of allowable values for that element. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EBADMEM Bad memory: The ISAM call was unable to allocate sufficient memory to continue. EBADMSG Not a data message: During a read(S), getmsg(S), or ioctl(S) IRECVFD system call to a STREAMS device, something has come to the head of the queue that cannot be processed. That something depends on the system call: read(S) - control information or a passed file descrip- tor getmsg(S) - passed file descriptor ioctl(S) - control or data information EBADR Bad request descriptor EBADRQC Bad request code EBADSLT Invalid slot EBFONT Bad font file fmt EBUSY Device busy: An attempt was made to mount a device that was already mounted or an attempt was made to dismount a device on which there is an active file (open file, current direc- tory, mounted-on file, active text segment). It also occurs if an attempt is made to enable accounting when it is already enabled. ECHRNG Channel number out of range ECHILD No child processes: A wait was executed by a process that had no existing or unwaited-for child processes. ECOMM Communication error on send: This error is RFS-specific. It occurs when trying to send messages to remote machines but no virtual circuit can be found. ECONNABORTED Software caused connection abort ECONNREFUSED Connection refused ECONNRESET Connection reset by peer EDEADLK Deadlock situation detected and avoided: A deadlock situation was detected and avoided. This error pertains to file and record locking. EDEADLOCK File locking deadlock EDESTADDRREQ Destination address required EDOM Math arg out of domain of func: The argument of a function in the math package is out of the domain of the function. EDOTDOT Undefined EDUPL Duplicate: The call tried to add a duplicate value to an ISAM index where duplicates are not permitted. This error results from a call to isaddindex(S), isrewcurr(S), isrewrite(S), or iswrite(S). The ISAM variable isstat1 is set to 2 and isstat2 is set to 2. EENDFILE End of file: The beginning or end of an ISAM file was encountered. The ISAM variable isstat1 is set to 1 and isstat2 is set to 0. EEXIST File exists: An existing file was mentioned in an inappropriate con- text, for example, link. EFAULT Bad address: The system encountered a hardware fault in attempting to use an argument of a system call. EFBIG File too large: The size of a file exceeded the maximum file size (1,082,201,088 bytes) or ULIMIT. EFLOCKED File locked: The ISAM file is exclusively locked by another process. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EFNAME Filename too long: The specified ISAM file is too long. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EHOSTDOWN Host is down EHOSTUNREACH No route to host EIDRM Identifier removed: This error is returned to a process that resumes execution due to the removal of an identifier from the file system's name space; see msgctl(S), semctl(S), and shmctl(S). EINPROGRESS Operation now in progress EINTR Interrupted system call: An asynchronous signal (such as interrupt or quit) that the user has elected to catch occurred during a system call. If execution is resumed after processing the sig- nal, it appears as if the interrupted system call returned this error condition. EIO I/O error: Some physical I/O error. This error may in some cases occur on a call following the one to which it actually applies. EINIT Reserved: This error number is reserved for future use. EINVAL Invalid argument: An invalid argument (for example, dismounting a nonmounted device; mentioning an undefined signal in signal or kill; reading or writing a file for which lseek has generated a negative pointer) was specified. Also set by the math functions described in the (S) entries of this manual. EISCONN Socket is already connected EISDIR Is a directory: An attempt was made to write on a directory. EISNAM Is a name file: A name file (semaphore, shared data, and so on) was speci- fied when not expected. EKEXISTS Key exists: The ISAM call tried to add an index that already exists. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EL2HLT Level 2 halted EL3HLT Level 3 halted EL3RST Level 3 reset ELBIN Undefined ELIBACC Cannot access a needed shared library: Trying to exec(S) an a.outthat requires a shared library (to be linked in) and the shared library does not exist or the user does not have permission to use it. ELIBBAD Accessing a corrupted shared lib: Trying to exec(S) an a.out that requires a shared library (to be linked in), and exec(S) could not load the shared library. The shared library is probably corrupted. ELIBEXEC Cannot exec a shared library directly: Trying to exec a shared library directly. This is not allowed. ELIBMAX Attempting to link in more shared libraries than system limit: Trying to exec(S) an a.out that requires more shared libraries (to be linked in), than is allowed on the current configuration of the system. See the System Administrator's Guide ELIBSCN .lib section in a.out corrupted: Trying to exec(S) an a.out that requires a shared library (to be linked in) and there was erroneous data in the .lib section of the a.out. The .lib section tells exec(S) what shared libraries are needed. The a.out is probably cor- rupted. ELNRNG Link number out of range ELOCKED Locked record: The ISAM call requested a record that is locked for use by another process. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. ELOOP Directory not empty, or too many symbolic links in path EMFILE Too many open files: No process may have more file descriptors open at a time than the number set in the NOFILES tunable kernel parame- ter. EMLINK Too many links: An attempt was made to make more than the maximum number of links (1000) to a file. EMSGSIZE Message too long EMULTIHOP Multihop attempted: This error is RFS-specific. It occurs when users try to access remote resources that are not directly accessible. ENAMETOOLONG Filename too long: The filename given was longer than is allowed. ENANO Anode table overflow ENAVAIL Not available: An opensem(S), waitsem(S), or sigsem(S) was issued to a semaphore that has not been initialized by a call to creatsem(S). A sigsem was issued to a semaphore out of sequence; that is, before the process has issued the cor- responding waitsem to the semaphore. An nbwaitsem was issued to a semaphore guarding a resource that is currently in use by another process. The semaphore on which a process was waiting has been left in an incon- sistent state when the process controlling the semaphore exits without relinquishing control properly; that is, without issuing a waitsem on the semaphore. ENETDOWN Network is down ENETRESET Network dropped connection on reset ENETUNREACH Network is unreachable ENFILE File table overflow: An attempt to open a file occurred while the system table of open files was full. While the table is full, no opens are accepted. ENOBUFS No buffer space available ENOCSI No CSI structure available ENOCURR No current record: The ISAM call has been requested to operate on the current record when not-current-record has been defined. The ISAM variable isstat1 is set to 2 and isstat2 is set to 1. ENODATA No data ENODEV No such device: An attempt was made to apply an inappropriate system call to a device; for example, reading from a write-only de- vice. ENOENT No such file or directory: A specified filename or directory did not exist. ENOEXEC Exec format error: A request was made to execute a file, which, although it had the appropriate permissions, did not start with a valid magic number. ENOLCK No record locks available: An attempt was made to lock or unlock a file that would have created an additional lock table entry while the sys- tem lock table was full. ENOLINK The link has been severed: An attempt was made to connect to a remote machine with RFS and the link (virtual circuit) was not available. ENOLOK No lock: The requested ISAM lock manager cannot be established. Check the DBKEY environment variable. ENOMEM Not enough space: During an exec, or sbrk, a program requested more space than the system was able to supply. This is not a tem- porary condition; the maximum space size is a system parameter. The error may also occur if the arrangement of text, data, and stack segments requires too many segmenta- tion registers, or if there is not enough swap space dur- ing a fork. ENOMSG No message of desired type: An attempt was made to receive a message of a type that does not exist on the specified message queue; see msgop(S). ENONET Machine is not on the network: An attempt was made to advertise, unadvertise, mount, or unmount remote RFS resources when a machine has not done the proper start-up to connect to the network. ENOTNAM Not a name file: A creatsem(S), opensem(S), waitsem(S), or sigsem(S) was issued using an invalid semaphore identifier. ENOPKG Package not installed: An attempt was made to call a routine in an uninstalled package. ENOPROTOOPT Protocol not available ENOREC No record: The ISAM file contains no record meeting the search condi- tions. The ISAM variable isstat1 is set to 2 and isstat2 is set to 3. ENOSPC No space left on device: During a write to an ordinary file, no free space was found on the device. ENOSR Out of streams resources: During a STREAMS open(S), either no STREAMS queues or no STREAMS head data structures were available. ENOSTR Device not a stream: A putmsg(S) or getmsg(S) system call was attempted on a file descriptor that is not a STREAMS device. ENOSYS Function not implemented ENOTBLK Block device required: A nonblock file was specified where a block device was required, for example, in a call to mount(S). ENOTCONN Socket is not connected ENOTDIR Not a directory: A directory was specified that cannot be found such as in a path prefix or as an argument to chdir(S). ENOTEMPTY Directory not empty ENOTEXCL Not exclusive: The ISAM call tried to add or delete an index but the file was not opened in exclusive mode. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. ENOTOPEN Not open: The call tried to operate on an ISAM file that was not yet opened or tried to perform an operation not specified by the isopen(S)) read/write mode value in effect. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. ENOTSOCK Socket operation on non-socket ENOTTY Not a character device: The device requested could not be opened for character I/O. ENOTUNIQ Name not unique on network: An attempt was made to access a network and duplicate net- work names were found. Each system on the network must have a unique name. ENXIO No such device or address: I/O was attempted on a non-existing subdevice, or address- ing is performed outside the limits of a device. This error may occur when a tape drive is not on line or a disk pack is not loaded on a drive. EOPNOTSUPP Operation not supported on socket EPERM Not owner: Typically, this error indicates an attempt to modify a file was made in some way forbidden except to its owner or to the super user. This error value is also returned for attempts by ordinary users to do things allowed only to the super user. EPFNOSUPPORT Protocol family not supported EPIPE Broken pipe: A write on a pipe was made for which a process was not available to read the data. This condition normally gen- erates a signal; the error is returned if the signal is ignored. EPKDUP Primary ISAM key duplicate EPRIMEKEY Primary key: The ISAM call tried to delete the primary key index. The primary key may not be deleted with isdelindex(S). The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. EPROTO Protocol error: A protocol error occurred. This error is device-specific, but is generally not related to a hardware failure. EPROTONOSUPPORT Protocol not supported EPROTOTYPE Protocol wrong type for socket ERANGE Math result not representable: The value of a function in the math package cannot be represented within machine precision. EREMCHG Remote address changed EREMDEV Reserved: This error number is reserved for future use. EREMOTE The object is remote: This error is RFS-specific. It occurs when users try to advertise a resource that is not on the local machine, or try to mount/unmount a device (or pathname) that is on a remote machine. EREMOTEIO Remote I/O error: There was an I/O error on a remote device. EROFS Read-only filesystem: An attempt to modify a file or directory was made on a de- vice mounted read-only. ESPIPE Illegal seek: A call to lseek(S) was issued to a pipe. ESHUTDOWN Cannot send after socket shutdown ESOCKTNOSUPPORT Socket type not supported ESRCH No such process: No process can be found corresponding to that specified by pid in kill or ptrace. ESRMNT srmount error: This error is RFS-specific. It occurs when users try to stop RFS while resources are still mounted by remote ma- chines. ETIME Timer expired: The timer set for a STREAMS ioctl(S) call has expired. The cause of this error is device specific and indicates either a hardware or software failure, or perhaps a timeout value that is too short for the specific opera- tion. The status of the ioctl(S) operation is indeter- minate. ETIMEDOUT Connection timed out ETOOMANY Too many files open: The ISAM call attempted to exceed the maximum number of files that can be open at one time. The ISAM variable isstat1 is set to 9 and isstat2 is set to 0. ETOOMANYREFS Too many references: cannot splice ETXTBSY Text file busy: An attempt was made to execute a pure-procedure program that is currently open for writing (or reading). Also an attempt to open for writing a pure-procedure program that is being executed. EUCLEAN Filesystem needs cleaning: An attempt was made to mount a filesystem using mount(S), but the super block is not flagged as clean. EUNATCH Protocol driver not attached EWOULDBLOCK Operation would block EXDEV Cross-device link: A link to a file on another device was attempted. EXFULL Exchange table full IEBACC Inaccessible database IEBADC Bad call of function IEBADF Corrupted database/msgcat IEIBNV Bad environment IEICNV Illegal conversion table IEICOD Illegal code in the database IEICOL Illegal collation table IEICPR Illegal conversion in doprnt IEICSC Illegal conversion in doscan IEICTM Illegal format in ictime IEINTL Illegal database pointer IEIPRP Illegal property table IEISTI Illegal string index table IEISTR Illegal string name IENMEM Not enough memory IENMSG No message available IENOOP Cannot open message catalog IEREAD Read error in message catalog IERROR General error return used TACCES Incorrect permissions TADDRBUSY The specified address is already in use. TBADADDR Incorrect address format TBADDATA Illegal amount of data TBADF Illegal transport file descriptor TBADFLAG Bad flags TBADNAME Invalid transport provider name TBADOPT Incorrect option format TBADQLEN The qlen member of the tbind structure has a value of zero. TBADSEQ Bad call sequence number TBUFOVFLW Buffer not large enough TNOADDR Could not allocate address TFLOW Flow control TLOOK Event requires attention TNODATA No data units are available TNODIS No disconnect request found in the queue TNOREL No orderly release request found in the queue TNOSTRUCTYPE Unsupported structure type requested TNOTSUPPORT Primitive not supported TNOUDERR Unit data error not found TOUTSTATE Out of state TSTATECHNG State is in process of changing TSYSERR System error Notes The following tables provide more information for ISAM errors using the isstat1 and isstat2 variables: isstat1 Description __________________________________________ 0 Successful execution of the call 1 End of file encountered 2 Invalid key 3 System error 9 User-defined error The isstat2 values are not defined. See also Development System Encyclopedia for definitions and concepts