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