1.\"- 2.\" SPDX-License-Identifier: BSD-3-Clause 3.\" 4.\" Copyright (c) 1980, 1983, 1986, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.Dd April 19, 2024 32.Dt INTRO 2 33.Os 34.Sh NAME 35.Nm intro 36.Nd introduction to system calls and error numbers 37.Sh LIBRARY 38.Lb libc 39.Sh SYNOPSIS 40.In errno.h 41.Sh DESCRIPTION 42This section provides an overview of the system calls, 43their error returns, and other common definitions and concepts. 44.\".Pp 45.\".Sy System call restart 46.\".Pp 47.\"(more later...) 48.Sh DEFINITIONS 49.Bl -tag -width Ds 50.It Process ID 51Each active process in the system is uniquely identified by a non-negative 52integer called a process ID. 53The range of this ID is from 0 to 99999. 54.It Parent process ID 55A new process is created by a currently active process 56.Pq see Xr fork 2 . 57The parent process ID of a process is initially the process ID of its creator. 58If the creating process exits, 59the parent process ID of each child is set to the ID of the calling process's 60reaper 61.Pq see Xr procctl 2 , 62normally 63.Xr init 8 . 64.It Process Group 65Each active process is a member of a process group that is identified by 66a non-negative integer called the process group ID. 67This is the process 68ID of the group leader. 69This grouping permits the signaling of related processes 70.Pq see Xr termios 4 71and the job control mechanisms of 72.Xr csh 1 . 73.It Session 74A session is a set of one or more process groups. 75A session is created by a successful call to 76.Xr setsid 2 , 77which causes the caller to become the only member of the only process 78group in the new session. 79.It Session leader 80A process that has created a new session by a successful call to 81.Xr setsid 2 , 82is known as a session leader. 83Only a session leader may acquire a terminal as its controlling terminal 84.Pq see Xr termios 4 . 85.It Controlling process 86A session leader with a controlling terminal is a controlling process. 87.It Controlling terminal 88A terminal that is associated with a session is known as the controlling 89terminal for that session and its members. 90.It Terminal Process Group ID 91A terminal may be acquired by a session leader as its controlling terminal. 92Once a terminal is associated with a session, any of the process groups 93within the session may be placed into the foreground by setting 94the terminal process group ID to the ID of the process group. 95This facility is used 96to arbitrate between multiple jobs contending for the same terminal 97.Pq see Xr csh 1 and Xr tty 4 . 98.It Orphaned Process Group 99A process group is considered to be 100.Em orphaned 101if it is not under the control of a job control shell. 102More precisely, a process group is orphaned 103when none of its members has a parent process that is in the same session 104as the group, 105but is in a different process group. 106Note that when a process exits, the parent process for its children 107is normally changed to be 108.Xr init 8 , 109which is in a separate session. 110Not all members of an orphaned process group are necessarily orphaned 111processes 112.Pq those whose creating process has exited . 113The process group of a session leader is orphaned by definition. 114.It Real User ID and Real Group ID 115Each user on the system is identified by a positive integer 116termed the real user ID. 117.Pp 118Each user is also a member of one or more groups. 119One of these groups is distinguished from others and 120used in implementing accounting facilities. 121The positive 122integer corresponding to this distinguished group is termed 123the real group ID. 124.Pp 125All processes have a real user ID and real group ID. 126These are initialized from the equivalent attributes 127of the process that created it. 128.It Effective User Id, Effective Group Id, and Group Access List 129Access to system resources is governed by two values: 130the effective user ID, and the group access list. 131The first member of the group access list is also known as the 132effective group ID. 133In POSIX.1, the group access list is known as the set of supplementary 134group IDs, and it is unspecified whether the effective group ID is 135a member of the list. 136.Pp 137The effective user ID and effective group ID are initially the 138process's real user ID and real group ID respectively. 139Either 140may be modified through execution of a set-user-ID or set-group-ID file 141.Pq possibly by one its ancestors 142.Pq see Xr execve 2 . 143By convention, the effective group ID 144.Pq the first member of the group access list 145is duplicated, so that the execution of a set-group-ID program 146does not result in the loss of the original 147.Pq real 148group ID. 149.Pp 150The group access list is a set of group IDs 151used only in determining resource accessibility. 152Access checks 153are performed as described below in ``File Access Permissions''. 154.It Saved Set User ID and Saved Set Group ID 155When a process executes a new file, the effective user ID is set 156to the owner of the file if the file is set-user-ID, and the effective 157group ID 158.Pq first element of the group access list 159is set to the group of the file if the file is set-group-ID. 160The effective user ID of the process is then recorded as the saved set-user-ID, 161and the effective group ID of the process is recorded as the saved set-group-ID. 162These values may be used to regain those values as the effective user 163or group ID after reverting to the real ID 164.Pq see Xr setuid 2 . 165In POSIX.1, the saved set-user-ID and saved set-group-ID are optional, 166and are used in setuid and setgid, but this does not work as desired 167for the super-user. 168.It Super-user 169A process is recognized as a 170.Em super-user 171process and is granted special privileges if its effective user ID is 0. 172.It Descriptor 173An integer assigned by the system when a file is referenced 174by 175.Xr open 2 176or 177.Xr dup 2 , 178or when a socket is created by 179.Xr pipe 2 , 180.Xr socket 2 181or 182.Xr socketpair 2 , 183which uniquely identifies an access path to that file or socket from 184a given process or any of its children. 185.It File Name 186Names consisting of up to 187.Brq Dv NAME_MAX 188characters may be used to name 189an ordinary file, special file, or directory. 190.Pp 191These characters may be arbitrary eight-bit values, 192excluding 193.Dv NUL 194.Pq ASCII 0 195and the 196.Ql \&/ 197character 198.Pq slash, ASCII 47 . 199.Pp 200Note that it is generally unwise to use 201.Ql \&* , 202.Ql \&? , 203.Ql \&[ 204or 205.Ql \&] 206as part of 207file names because of the special meaning attached to these characters 208by the shell. 209.It Path Name 210A path name is a 211.Dv NUL Ns -terminated 212character string starting with an 213optional slash 214.Ql \&/ , 215followed by zero or more directory names separated 216by slashes, optionally followed by a file name. 217The total length of a path name must be less than 218.Brq Dv PATH_MAX 219characters. 220On some systems, this limit may be infinite. 221.Pp 222If a path name begins with a slash, the path search begins at the 223.Em root 224directory. 225Otherwise, the search begins from the current working directory. 226A slash by itself names the root directory. 227An empty 228pathname refers to the current directory. 229.It Directory 230A directory is a special type of file that contains entries 231that are references to other files. 232Directory entries are called links. 233By convention, a directory 234contains at least two links, 235.Ql .\& 236and 237.Ql \&.. , 238referred to as 239.Em dot 240and 241.Em dot-dot 242respectively. 243Dot refers to the directory itself and 244dot-dot refers to its parent directory. 245.It Root Directory and Current Working Directory 246Each process has associated with it a concept of a root directory 247and a current working directory for the purpose of resolving path 248name searches. 249A process's root directory need not be the root 250directory of the root file system. 251.It File Access Permissions 252Every file in the file system has a set of access permissions. 253These permissions are used in determining whether a process 254may perform a requested operation on the file 255.Pq such as opening a file for writing . 256Access permissions are established at the 257time a file is created. 258They may be changed at some later time 259through the 260.Xr chmod 2 261call. 262.Pp 263File access is broken down according to whether a file may be: read, 264written, or executed. 265Directory files use the execute 266permission to control if the directory may be searched. 267.Pp 268File access permissions are interpreted by the system as 269they apply to three different classes of users: the owner 270of the file, those users in the file's group, anyone else. 271Every file has an independent set of access permissions for 272each of these classes. 273When an access check is made, the system 274decides if permission should be granted by checking the access 275information applicable to the caller. 276.Pp 277Read, write, and execute/search permissions on 278a file are granted to a process if: 279.Pp 280The process's effective user ID is that of the super-user. 281Note that even the super-user cannot execute a non-executable file. 282.Pp 283The process's effective user ID matches the user ID of the owner 284of the file and the owner permissions allow the access. 285.Pp 286The process's effective user ID does not match the user ID of the 287owner of the file, and either the process's effective 288group ID matches the group ID 289of the file, or the group ID of the file is in 290the process's group access list, 291and the group permissions allow the access. 292.Pp 293Neither the effective user ID nor effective group ID 294and group access list of the process 295match the corresponding user ID and group ID of the file, 296but the permissions for ``other users'' allow access. 297.Pp 298Otherwise, permission is denied. 299.It Sockets and Address Families 300A socket is an endpoint for communication between processes. 301Each socket has queues for sending and receiving data. 302.Pp 303Sockets are typed according to their communications properties. 304These properties include whether messages sent and received 305at a socket require the name of the partner, whether communication 306is reliable, the format used in naming message recipients, etc. 307.Pp 308Each instance of the system supports some 309collection of socket types; consult 310.Xr socket 2 311for more information about the types available and 312their properties. 313.Pp 314Each instance of the system supports some number of sets of 315communications protocols. 316Each protocol set supports addresses 317of a certain format. 318An Address Family is the set of addresses 319for a specific group of protocols. 320Each socket has an address 321chosen from the address family in which the socket was created. 322.El 323.Sh FILES 324.Bl -inset -compact 325.It Pa /usr/include/sys/syscall.h 326Table of currently available system calls. 327.El 328.Sh ERRORS 329Nearly all of the system calls provide an error number referenced via 330the external identifier 331.Va errno . 332This identifier is defined in 333.In sys/errno.h 334as: 335.Pp 336.Dl extern int * __error(); 337.Dl #define errno (* __error()) 338.Pp 339The 340.Va __error() 341function returns a pointer to a field in the thread specific structure for 342threads other than the initial thread. 343For the initial thread and 344non-threaded processes, 345.Va __error() 346returns a pointer to a global 347.Va errno 348variable that is compatible with the previous definition. 349.Pp 350When a system call detects an error, 351it returns an integer value 352indicating failure 353.Pq usually -1 354and sets the variable 355.Va errno 356accordingly. 357This allows interpretation of the failure on receiving 358-1 and to take action accordingly. 359Successful calls never set 360.Va errno ; 361once set, it remains until another error occurs. 362It should only be examined after an error. 363Note that a number of system calls overload the meanings of these 364error numbers, and that the meanings must be interpreted according 365to the type and circumstances of the call. 366.Pp 367The following is a complete list of the errors and their 368names as given in 369.In sys/errno.h . 370.Bl -hang -width Ds 371.It Er 0 Em "Undefined error: 0" . 372Not used. 373.It Er 1 EPERM Em "Operation not permitted" . 374An attempt was made to perform an operation limited to processes 375with appropriate privileges or to the owner of a file or other 376resources. 377.It Er 2 ENOENT Em "No such file or directory" . 378A component of a specified pathname did not exist, or the 379pathname was an empty string. 380.It Er 3 ESRCH Em "No such process" . 381No process could be found corresponding to that specified by the given 382process ID. 383.It Er 4 EINTR Em "Interrupted system call" . 384An asynchronous signal 385.Pq such as Dv SIGINT or Dv SIGQUIT 386was caught by the process during the execution of an interruptible 387function. 388If the signal handler performs a normal return, the 389interrupted system call will seem to have returned the error condition. 390.It Er 5 EIO Em "Input/output error" . 391Some physical input or output error occurred. 392This error will not be reported until a subsequent operation on the same file 393descriptor and may be lost 394.Pq over written 395by any subsequent errors. 396.It Er 6 ENXIO Em "Device not configured" . 397Input or output on a special file referred to a device that did not 398exist, or 399made a request beyond the limits of the device. 400This error may also occur when, for example, 401a tape drive is not online or no disk pack is 402loaded on a drive. 403.It Er 7 E2BIG Em "Argument list too long" . 404The number of bytes used for the argument and environment 405list of the new process exceeded the current limit 406.Pq Dv NCARGS in In sys/param.h . 407.It Er 8 ENOEXEC Em "Exec format error" . 408A request was made to execute a file 409that, although it has the appropriate permissions, 410was not in the format required for an 411executable file. 412.It Er 9 EBADF Em "Bad file descriptor" . 413A file descriptor argument was out of range, referred to no open file, 414or a read 415.Pq write 416request was made to a file that was only open for writing 417.Pq reading . 418.It Er 10 ECHILD Em "\&No child processes" . 419A 420.Xr wait 2 or Xr waitpid 2 421function was executed by a process that had no existing or unwaited-for 422child processes. 423.It Er 11 EDEADLK Em "Resource deadlock avoided" . 424An attempt was made to lock a system resource that 425would have resulted in a deadlock situation. 426.It Er 12 ENOMEM Em "Cannot allocate memory" . 427The new process image required more memory than was allowed by the hardware 428or by system-imposed memory management constraints. 429A lack of swap space is normally temporary; however, 430a lack of core is not. 431Soft limits may be increased to their corresponding hard limits. 432.It Er 13 EACCES Em "Permission denied" . 433An attempt was made to access a file in a way forbidden 434by its file access permissions. 435.It Er 14 EFAULT Em "Bad address" . 436The system detected an invalid address in attempting to 437use an argument of a call. 438.It Er 15 ENOTBLK Em "Block device required" . 439A block device operation was attempted on a non-block device or file. 440.It Er 16 EBUSY Em "Device busy" . 441An attempt to use a system resource which was in use at the time 442in a manner which would have conflicted with the request. 443.It Er 17 EEXIST Em "File exists" . 444An existing file was mentioned in an inappropriate context, 445for instance, as the new link name in a 446.Xr link 2 447system call. 448.It Er 18 EXDEV Em "Cross-device link" . 449A hard link to a file on another file system 450was attempted. 451.It Er 19 ENODEV Em "Operation not supported by device" . 452An attempt was made to apply an inappropriate 453function to a device, 454for example, 455trying to read a write-only device such as a printer. 456.It Er 20 ENOTDIR Em "Not a directory" . 457A component of the specified pathname existed, but it was 458not a directory, when a directory was expected. 459.It Er 21 EISDIR Em "Is a directory" . 460An attempt was made to open a directory with write mode specified. 461.It Er 22 EINVAL Em "Invalid argument" . 462Some invalid argument was supplied. 463For example, specifying an undefined signal to a 464.Xr signal 3 465function or a 466.Xr kill 2 467system call. 468.It Er 23 ENFILE Em "Too many open files in system" . 469Maximum number of open files allowable on the system 470has been reached and requests for an open cannot be satisfied 471until at least one has been closed. 472.It Er 24 EMFILE Em "Too many open files" . 473Maximum number of file descriptors allowable in the process 474has been reached and requests for an open cannot be satisfied 475until at least one has been closed. 476The 477.Xr getdtablesize 2 478system call will obtain the current limit. 479.It Er 25 ENOTTY Em "Inappropriate ioctl for device" . 480A control function 481.Pq see Xr ioctl 2 482was attempted for a file or 483special device for which the operation was inappropriate. 484.It Er 26 ETXTBSY Em "Text file busy" . 485The new process was a pure procedure 486.Pq shared text 487file which was open for writing by another process, or 488while the pure procedure file was being executed an 489.Xr open 2 490call requested write access. 491.It Er 27 EFBIG Em "File too large" . 492The size of a file exceeded the maximum. 493.It Er 28 ENOSPC Em "No space left on device" . 494A 495.Xr write 2 496to an ordinary file, the creation of a 497directory or symbolic link, or the creation of a directory 498entry failed because no more disk blocks were available 499on the file system, or the allocation of an inode for a newly 500created file failed because no more inodes were available 501on the file system. 502.It Er 29 ESPIPE Em "Illegal seek" . 503An 504.Xr lseek 2 505system call was issued on a socket, pipe or FIFO. 506.It Er 30 EROFS Em "Read-only file system" . 507An attempt was made to modify a file or directory 508on a file system that was read-only at the time. 509.It Er 31 EMLINK Em "Too many links" . 510Maximum allowable hard links to a single file has been exceeded 511.Pq limit of 32767 hard links per file . 512.It Er 32 EPIPE Em "Broken pipe" . 513A write on a pipe, socket or FIFO for which there is no process to read 514the data. 515.It Er 33 EDOM Em "Numerical argument out of domain" . 516A numerical input argument was outside the defined domain of the mathematical 517function. 518.It Er 34 ERANGE Em "Result too large" . 519A numerical result of the function was too large to fit in the 520available space 521.Pq perhaps exceeded precision . 522.It Er 35 EAGAIN Em "Resource temporarily unavailable" . 523This is a temporary condition and later calls to the 524same routine may complete normally. 525.It Er 36 EINPROGRESS Em "Operation now in progress" . 526An operation that takes a long time to complete, such as 527.Xr connect 2 , 528was attempted on a non-blocking object 529.Pq see Xr fcntl 2 . 530.It Er 37 EALREADY Em "Operation already in progress" . 531An operation was attempted on a non-blocking object that already 532had an operation in progress. 533.It Er 38 ENOTSOCK Em "Socket operation on non-socket" . 534Self-explanatory. 535.It Er 39 EDESTADDRREQ Em "Destination address required" . 536A required address was omitted from an operation on a socket. 537.It Er 40 EMSGSIZE Em "Message too long" . 538A message sent on a socket was larger than the internal message buffer 539or some other network limit. 540.It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" . 541A protocol was specified that does not support the semantics of the 542socket type requested. 543For example, you cannot use the ARPA Internet UDP protocol with type 544.Dv SOCK_STREAM . 545.It Er 42 ENOPROTOOPT Em "Protocol not available" . 546A bad option or level was specified in a 547.Xr getsockopt 2 548or 549.Xr setsockopt 2 550call. 551.It Er 43 EPROTONOSUPPORT Em "Protocol not supported" . 552The protocol has not been configured into the 553system or no implementation for it exists. 554.It Er 44 ESOCKTNOSUPPORT Em "Socket type not supported" . 555The support for the socket type has not been configured into the 556system or no implementation for it exists. 557.It Er 45 EOPNOTSUPP Em "Operation not supported" . 558The attempted operation is not supported for the type of object referenced. 559Usually this occurs when a file descriptor refers to a file or socket 560that cannot support this operation, 561for example, trying to 562.Em accept 563a connection on a datagram socket. 564.It Er 46 EPFNOSUPPORT Em "Protocol family not supported" . 565The protocol family has not been configured into the 566system or no implementation for it exists. 567.It Er 47 EAFNOSUPPORT Em "Address family not supported by protocol family" . 568An address incompatible with the requested protocol was used. 569For example, you should not necessarily expect to be able to use 570NS addresses with ARPA Internet protocols. 571.It Er 48 EADDRINUSE Em "Address already in use" . 572Only one usage of each address is normally permitted. 573.It Er 49 EADDRNOTAVAIL Em "Can't assign requested address" . 574Normally results from an attempt to create a socket with an 575address not on this machine. 576.It Er 50 ENETDOWN Em "Network is down" . 577A socket operation encountered a dead network. 578.It Er 51 ENETUNREACH Em "Network is unreachable" . 579A socket operation was attempted to an unreachable network. 580.It Er 52 ENETRESET Em "Network dropped connection on reset" . 581The host you were connected to crashed and rebooted. 582.It Er 53 ECONNABORTED Em "Software caused connection abort" . 583A connection abort was caused internal to your host machine. 584.It Er 54 ECONNRESET Em "Connection reset by peer" . 585A connection was forcibly closed by a peer. 586This normally 587results from a loss of the connection on the remote socket 588due to a timeout or a reboot. 589.It Er 55 ENOBUFS Em "\&No buffer space available" . 590An operation on a socket or pipe was not performed because 591the system lacked sufficient buffer space or because a queue was full. 592.It Er 56 EISCONN Em "Socket is already connected" . 593A 594.Xr connect 2 595request was made on an already connected socket; or, 596a 597.Xr sendto 2 598or 599.Xr sendmsg 2 600request on a connected socket specified a destination 601when already connected. 602.It Er 57 ENOTCONN Em "Socket is not connected" . 603An request to send or receive data was disallowed because 604the socket was not connected and 605.Pq when sending on a datagram socket 606no address was supplied. 607.It Er 58 ESHUTDOWN Em "Can't send after socket shutdown" . 608A request to send data was disallowed because the socket 609had already been shut down with a previous 610.Xr shutdown 2 611call. 612.It Er 60 ETIMEDOUT Em "Operation timed out" . 613A 614.Xr connect 2 615or 616.Xr send 2 617request failed because the connected party did not 618properly respond after a period of time. 619The timeout period is dependent on the communication protocol. 620.It Er 61 ECONNREFUSED Em "Connection refused" . 621No connection could be made because the target machine actively 622refused it. 623This usually results from trying to connect 624to a service that is inactive on the foreign host. 625.It Er 62 ELOOP Em "Too many levels of symbolic links" . 626A path name lookup involved more than 32 627.Pq Dv MAXSYMLINKS 628symbolic links. 629.It Er 63 ENAMETOOLONG Em "File name too long" . 630A component of a path name exceeded 631.Brq Dv NAME_MAX 632characters, or an entire 633path name exceeded 634.Brq Dv PATH_MAX 635characters. 636See also the description of 637.Dv _PC_NO_TRUNC in Xr pathconf 2 . 638.It Er 64 EHOSTDOWN Em "Host is down" . 639A socket operation failed because the destination host was down. 640.It Er 65 EHOSTUNREACH Em "No route to host" . 641A socket operation was attempted to an unreachable host. 642.It Er 66 ENOTEMPTY Em "Directory not empty" . 643A directory with entries other than 644.Ql .\& 645and 646.Ql ..\& 647was supplied to a remove directory or rename call. 648.It Er 67 EPROCLIM Em "Too many processes" . 649.It Er 68 EUSERS Em "Too many users" . 650The quota system ran out of table entries. 651.It Er 69 EDQUOT Em "Disc quota exceeded" . 652A 653.Xr write 2 654to an ordinary file, the creation of a 655directory or symbolic link, or the creation of a directory 656entry failed because the user's quota of disk blocks was 657exhausted, or the allocation of an inode for a newly 658created file failed because the user's quota of inodes 659was exhausted. 660.It Er 70 ESTALE Em "Stale NFS file handle" . 661An attempt was made to access an open file 662.Pq on an NFS file system 663which is now unavailable as referenced by the file descriptor. 664This may indicate the file was deleted on the NFS server or some 665other catastrophic event occurred. 666.It Er 72 EBADRPC Em "RPC struct is bad" . 667Exchange of RPC information was unsuccessful. 668.It Er 73 ERPCMISMATCH Em "RPC version wrong" . 669The version of RPC on the remote peer is not compatible with 670the local version. 671.It Er 74 EPROGUNAVAIL Em "RPC prog. not avail" . 672The requested program is not registered on the remote host. 673.It Er 75 EPROGMISMATCH Em "Program version wrong" . 674The requested version of the program is not available 675on the remote host 676.Pq RPC . 677.It Er 76 EPROCUNAVAIL Em "Bad procedure for program" . 678An RPC call was attempted for a procedure which does not exist 679in the remote program. 680.It Er 77 ENOLCK Em "No locks available" . 681A system-imposed limit on the number of simultaneous file 682locks was reached. 683.It Er 78 ENOSYS Em "Function not implemented" . 684Attempted a system call that is not available on this 685system. 686.It Er 79 EFTYPE Em "Inappropriate file type or format" . 687The file was the wrong type for the operation, or a data file had 688the wrong format. 689.It Er 80 EAUTH Em "Authentication error" . 690Attempted to use an invalid authentication ticket to mount a 691NFS file system. 692.It Er 81 ENEEDAUTH Em "Need authenticator" . 693An authentication ticket must be obtained before the given NFS 694file system may be mounted. 695.It Er 82 EIDRM Em "Identifier removed" . 696An IPC identifier was removed while the current process was waiting on it. 697.It Er 83 ENOMSG Em "No message of desired type" . 698An IPC message queue does not contain a message of the desired type, or a 699message catalog does not contain the requested message. 700.It Er 84 EOVERFLOW Em "Value too large to be stored in data type" . 701A numerical result of the function was too large to be stored in the caller 702provided space. 703.It Er 85 ECANCELED Em "Operation canceled" . 704The scheduled operation was canceled. 705.It Er 86 EILSEQ Em "Illegal byte sequence" . 706While decoding a multibyte character the function came along an 707invalid or an incomplete sequence of bytes or the given wide 708character is invalid. 709.It Er 87 ENOATTR Em "Attribute not found" . 710The specified extended attribute does not exist. 711.It Er 88 EDOOFUS Em "Programming error" . 712A function or API is being abused in a way which could only be detected 713at run-time. 714.It Er 89 EBADMSG Em "Bad message" . 715A corrupted message was detected. 716.It Er 90 EMULTIHOP Em "Multihop attempted" . 717This error code is unused, but present for compatibility with other systems. 718.It Er 91 ENOLINK Em "Link has been severed" . 719This error code is unused, but present for compatibility with other systems. 720.It Er 92 EPROTO Em "Protocol error" . 721A device or socket encountered an unrecoverable protocol error. 722.It Er 93 ENOTCAPABLE Em "Capabilities insufficient" . 723An operation on a capability file descriptor requires greater privilege than 724the capability allows. 725.It Er 94 ECAPMODE Em "Not permitted in capability mode" . 726The system call or operation is not permitted for capability mode processes. 727.It Er 95 ENOTRECOVERABLE Em "State not recoverable" . 728The state protected by a robust mutex is not recoverable. 729.It Er 96 EOWNERDEAD Em "Previous owner died" . 730The owner of a robust mutex terminated while holding the mutex lock. 731.It Er 97 EINTEGRITY Em "Integrity check failed" . 732An integrity check such as a check-hash or a cross-correlation failed. 733The integrity error falls in the kernel I/O stack between 734.Er EINVAL 735that identifies errors in parameters to a system call and 736.Er EIO 737that identifies errors with the underlying storage media. 738It is typically raised by intermediate kernel layers such as a 739filesystem or an in-kernel GEOM subsystem when they detect inconsistencies. 740Uses include allowing the 741.Xr mount 8 742command to return a different exit value to automate the running of 743.Xr fsck 8 744during a system boot. 745.El 746.Sh SEE ALSO 747.Xr intro 3 , 748.Xr perror 3 749.Sh HISTORY 750The 751.Nm Ns Pq 2 752manual page first appeared in 753.At v5 . 754