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