xref: /freebsd/lib/libsys/intro.2 (revision bcc57e971597d28a3ab1f972775b295cc60e1017)
18269e767SBrooks Davis.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
28269e767SBrooks Davis.\"	The Regents of the University of California.  All rights reserved.
38269e767SBrooks Davis.\"
48269e767SBrooks Davis.\" Redistribution and use in source and binary forms, with or without
58269e767SBrooks Davis.\" modification, are permitted provided that the following conditions
68269e767SBrooks Davis.\" are met:
78269e767SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright
88269e767SBrooks Davis.\"    notice, this list of conditions and the following disclaimer.
98269e767SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright
108269e767SBrooks Davis.\"    notice, this list of conditions and the following disclaimer in the
118269e767SBrooks Davis.\"    documentation and/or other materials provided with the distribution.
128269e767SBrooks Davis.\" 3. Neither the name of the University nor the names of its contributors
138269e767SBrooks Davis.\"    may be used to endorse or promote products derived from this software
148269e767SBrooks Davis.\"    without specific prior written permission.
158269e767SBrooks Davis.\"
168269e767SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
178269e767SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188269e767SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198269e767SBrooks Davis.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
208269e767SBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218269e767SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228269e767SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238269e767SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248269e767SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258269e767SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268269e767SBrooks Davis.\" SUCH DAMAGE.
278269e767SBrooks Davis.\"
28*bcc57e97SAlexander Ziaee.Dd April 19, 2024
298269e767SBrooks Davis.Dt INTRO 2
308269e767SBrooks Davis.Os
318269e767SBrooks Davis.Sh NAME
328269e767SBrooks Davis.Nm intro
338269e767SBrooks Davis.Nd introduction to system calls and error numbers
348269e767SBrooks Davis.Sh LIBRARY
358269e767SBrooks Davis.Lb libc
368269e767SBrooks Davis.Sh SYNOPSIS
378269e767SBrooks Davis.In errno.h
388269e767SBrooks Davis.Sh DESCRIPTION
398269e767SBrooks DavisThis section provides an overview of the system calls,
408269e767SBrooks Davistheir error returns, and other common definitions and concepts.
418269e767SBrooks Davis.\".Pp
428269e767SBrooks Davis.\".Sy System call restart
438269e767SBrooks Davis.\".Pp
448269e767SBrooks Davis.\"(more later...)
458269e767SBrooks Davis.Sh RETURN VALUES
468269e767SBrooks DavisNearly all of the system calls provide an error number referenced via
478269e767SBrooks Davisthe external identifier errno.
488269e767SBrooks DavisThis identifier is defined in
498269e767SBrooks Davis.In sys/errno.h
508269e767SBrooks Davisas
518269e767SBrooks Davis.Pp
528269e767SBrooks Davis.Dl extern    int *       __error();
538269e767SBrooks Davis.Dl #define   errno       (* __error())
548269e767SBrooks Davis.Pp
558269e767SBrooks DavisThe
568269e767SBrooks Davis.Va __error()
578269e767SBrooks Davisfunction returns a pointer to a field in the thread specific structure for
588269e767SBrooks Davisthreads other than the initial thread.
598269e767SBrooks DavisFor the initial thread and
608269e767SBrooks Davisnon-threaded processes,
618269e767SBrooks Davis.Va __error()
628269e767SBrooks Davisreturns a pointer to a global
638269e767SBrooks Davis.Va errno
648269e767SBrooks Davisvariable that is compatible with the previous definition.
658269e767SBrooks Davis.Pp
668269e767SBrooks DavisWhen a system call detects an error,
678269e767SBrooks Davisit returns an integer value
688269e767SBrooks Davisindicating failure (usually -1)
698269e767SBrooks Davisand sets the variable
708269e767SBrooks Davis.Va errno
718269e767SBrooks Davisaccordingly.
728269e767SBrooks Davis(This allows interpretation of the failure on receiving
738269e767SBrooks Davisa -1 and to take action accordingly.)
748269e767SBrooks DavisSuccessful calls never set
758269e767SBrooks Davis.Va errno ;
768269e767SBrooks Davisonce set, it remains until another error occurs.
778269e767SBrooks DavisIt should only be examined after an error.
788269e767SBrooks DavisNote that a number of system calls overload the meanings of these
798269e767SBrooks Daviserror numbers, and that the meanings must be interpreted according
808269e767SBrooks Davisto the type and circumstances of the call.
818269e767SBrooks Davis.Pp
828269e767SBrooks DavisThe following is a complete list of the errors and their
838269e767SBrooks Davisnames as given in
848269e767SBrooks Davis.In sys/errno.h .
858269e767SBrooks Davis.Bl -hang -width Ds
868269e767SBrooks Davis.It Er 0 Em "Undefined error: 0" .
878269e767SBrooks DavisNot used.
888269e767SBrooks Davis.It Er 1 EPERM Em "Operation not permitted" .
898269e767SBrooks DavisAn attempt was made to perform an operation limited to processes
908269e767SBrooks Daviswith appropriate privileges or to the owner of a file or other
918269e767SBrooks Davisresources.
928269e767SBrooks Davis.It Er 2 ENOENT Em "No such file or directory" .
938269e767SBrooks DavisA component of a specified pathname did not exist, or the
948269e767SBrooks Davispathname was an empty string.
958269e767SBrooks Davis.It Er 3 ESRCH Em "No such process" .
968269e767SBrooks DavisNo process could be found corresponding to that specified by the given
978269e767SBrooks Davisprocess ID.
988269e767SBrooks Davis.It Er 4 EINTR Em "Interrupted system call" .
998269e767SBrooks DavisAn asynchronous signal (such as
1008269e767SBrooks Davis.Dv SIGINT
1018269e767SBrooks Davisor
1028269e767SBrooks Davis.Dv SIGQUIT )
1038269e767SBrooks Daviswas caught by the process during the execution of an interruptible
1048269e767SBrooks Davisfunction.
1058269e767SBrooks DavisIf the signal handler performs a normal return, the
1068269e767SBrooks Davisinterrupted system call will seem to have returned the error condition.
1078269e767SBrooks Davis.It Er 5 EIO Em "Input/output error" .
1088269e767SBrooks DavisSome physical input or output error occurred.
1098269e767SBrooks DavisThis error will not be reported until a subsequent operation on the same file
1108269e767SBrooks Davisdescriptor and may be lost (over written) by any subsequent errors.
1118269e767SBrooks Davis.It Er 6 ENXIO Em "Device not configured" .
1128269e767SBrooks DavisInput or output on a special file referred to a device that did not
1138269e767SBrooks Davisexist, or
1148269e767SBrooks Davismade a request beyond the limits of the device.
1158269e767SBrooks DavisThis error may also occur when, for example,
1168269e767SBrooks Davisa tape drive is not online or no disk pack is
1178269e767SBrooks Davisloaded on a drive.
1188269e767SBrooks Davis.It Er 7 E2BIG Em "Argument list too long" .
1198269e767SBrooks DavisThe number of bytes used for the argument and environment
1208269e767SBrooks Davislist of the new process exceeded the current limit
1218269e767SBrooks Davis.Dv ( NCARGS
1228269e767SBrooks Davisin
1238269e767SBrooks Davis.In sys/param.h ) .
1248269e767SBrooks Davis.It Er 8 ENOEXEC Em "Exec format error" .
1258269e767SBrooks DavisA request was made to execute a file
1268269e767SBrooks Davisthat, although it has the appropriate permissions,
1278269e767SBrooks Daviswas not in the format required for an
1288269e767SBrooks Davisexecutable file.
1298269e767SBrooks Davis.It Er 9 EBADF Em "Bad file descriptor" .
1308269e767SBrooks DavisA file descriptor argument was out of range, referred to no open file,
1318269e767SBrooks Davisor a read (write) request was made to a file that was only open for
1328269e767SBrooks Daviswriting (reading).
1338269e767SBrooks Davis.It Er 10 ECHILD Em "\&No child processes" .
1348269e767SBrooks DavisA
1358269e767SBrooks Davis.Xr wait 2
1368269e767SBrooks Davisor
1378269e767SBrooks Davis.Xr waitpid 2
1388269e767SBrooks Davisfunction was executed by a process that had no existing or unwaited-for
1398269e767SBrooks Davischild processes.
1408269e767SBrooks Davis.It Er 11 EDEADLK Em "Resource deadlock avoided" .
1418269e767SBrooks DavisAn attempt was made to lock a system resource that
1428269e767SBrooks Daviswould have resulted in a deadlock situation.
1438269e767SBrooks Davis.It Er 12 ENOMEM Em "Cannot allocate memory" .
1448269e767SBrooks DavisThe new process image required more memory than was allowed by the hardware
1458269e767SBrooks Davisor by system-imposed memory management constraints.
1468269e767SBrooks DavisA lack of swap space is normally temporary; however,
1478269e767SBrooks Davisa lack of core is not.
1488269e767SBrooks DavisSoft limits may be increased to their corresponding hard limits.
1498269e767SBrooks Davis.It Er 13 EACCES Em "Permission denied" .
1508269e767SBrooks DavisAn attempt was made to access a file in a way forbidden
1518269e767SBrooks Davisby its file access permissions.
1528269e767SBrooks Davis.It Er 14 EFAULT Em "Bad address" .
1538269e767SBrooks DavisThe system detected an invalid address in attempting to
1548269e767SBrooks Davisuse an argument of a call.
1558269e767SBrooks Davis.It Er 15 ENOTBLK Em "Block device required" .
1568269e767SBrooks DavisA block device operation was attempted on a non-block device or file.
1578269e767SBrooks Davis.It Er 16 EBUSY Em "Device busy" .
1588269e767SBrooks DavisAn attempt to use a system resource which was in use at the time
1598269e767SBrooks Davisin a manner which would have conflicted with the request.
1608269e767SBrooks Davis.It Er 17 EEXIST Em "File exists" .
1618269e767SBrooks DavisAn existing file was mentioned in an inappropriate context,
1628269e767SBrooks Davisfor instance, as the new link name in a
1638269e767SBrooks Davis.Xr link 2
1648269e767SBrooks Davissystem call.
1658269e767SBrooks Davis.It Er 18 EXDEV Em "Cross-device link" .
1668269e767SBrooks DavisA hard link to a file on another file system
1678269e767SBrooks Daviswas attempted.
1688269e767SBrooks Davis.It Er 19 ENODEV Em "Operation not supported by device" .
1698269e767SBrooks DavisAn attempt was made to apply an inappropriate
1708269e767SBrooks Davisfunction to a device,
1718269e767SBrooks Davisfor example,
1728269e767SBrooks Davistrying to read a write-only device such as a printer.
1738269e767SBrooks Davis.It Er 20 ENOTDIR Em "Not a directory" .
1748269e767SBrooks DavisA component of the specified pathname existed, but it was
1758269e767SBrooks Davisnot a directory, when a directory was expected.
1768269e767SBrooks Davis.It Er 21 EISDIR Em "Is a directory" .
1778269e767SBrooks DavisAn attempt was made to open a directory with write mode specified.
1788269e767SBrooks Davis.It Er 22 EINVAL Em "Invalid argument" .
1798269e767SBrooks DavisSome invalid argument was supplied.
1808269e767SBrooks Davis(For example,
1818269e767SBrooks Davisspecifying an undefined signal to a
1828269e767SBrooks Davis.Xr signal 3
1838269e767SBrooks Davisfunction
1848269e767SBrooks Davisor a
1858269e767SBrooks Davis.Xr kill 2
1868269e767SBrooks Davissystem call).
1878269e767SBrooks Davis.It Er 23 ENFILE Em "Too many open files in system" .
1888269e767SBrooks DavisMaximum number of open files allowable on the system
1898269e767SBrooks Davishas been reached and requests for an open cannot be satisfied
1908269e767SBrooks Davisuntil at least one has been closed.
1918269e767SBrooks Davis.It Er 24 EMFILE Em "Too many open files" .
1928269e767SBrooks DavisMaximum number of file descriptors allowable in the process
1938269e767SBrooks Davishas been reached and requests for an open cannot be satisfied
1948269e767SBrooks Davisuntil at least one has been closed.
1958269e767SBrooks DavisThe
1968269e767SBrooks Davis.Xr getdtablesize 2
1978269e767SBrooks Davissystem call will obtain the current limit.
1988269e767SBrooks Davis.It Er 25 ENOTTY Em "Inappropriate ioctl for device" .
1998269e767SBrooks DavisA control function (see
2008269e767SBrooks Davis.Xr ioctl 2 )
2018269e767SBrooks Daviswas attempted for a file or
2028269e767SBrooks Davisspecial device for which the operation was inappropriate.
2038269e767SBrooks Davis.It Er 26 ETXTBSY Em "Text file busy" .
2048269e767SBrooks DavisThe new process was a pure procedure (shared text) file
2058269e767SBrooks Daviswhich was open for writing by another process, or
2068269e767SBrooks Daviswhile the pure procedure file was being executed an
2078269e767SBrooks Davis.Xr open 2
2088269e767SBrooks Daviscall requested write access.
2098269e767SBrooks Davis.It Er 27 EFBIG Em "File too large" .
2108269e767SBrooks DavisThe size of a file exceeded the maximum.
2118269e767SBrooks Davis.It Er 28 ENOSPC Em "No space left on device" .
2128269e767SBrooks DavisA
2138269e767SBrooks Davis.Xr write 2
2148269e767SBrooks Davisto an ordinary file, the creation of a
2158269e767SBrooks Davisdirectory or symbolic link, or the creation of a directory
2168269e767SBrooks Davisentry failed because no more disk blocks were available
2178269e767SBrooks Davison the file system, or the allocation of an inode for a newly
2188269e767SBrooks Daviscreated file failed because no more inodes were available
2198269e767SBrooks Davison the file system.
2208269e767SBrooks Davis.It Er 29 ESPIPE Em "Illegal seek" .
2218269e767SBrooks DavisAn
2228269e767SBrooks Davis.Xr lseek 2
2238269e767SBrooks Davissystem call was issued on a socket, pipe or
2248269e767SBrooks Davis.Tn FIFO .
2258269e767SBrooks Davis.It Er 30 EROFS Em "Read-only file system" .
2268269e767SBrooks DavisAn attempt was made to modify a file or directory
2278269e767SBrooks Davison a file system that was read-only at the time.
2288269e767SBrooks Davis.It Er 31 EMLINK Em "Too many links" .
2298269e767SBrooks DavisMaximum allowable hard links to a single file has been exceeded (limit
2308269e767SBrooks Davisof 32767 hard links per file).
2318269e767SBrooks Davis.It Er 32 EPIPE Em "Broken pipe" .
2328269e767SBrooks DavisA write on a pipe, socket or
2338269e767SBrooks Davis.Tn FIFO
2348269e767SBrooks Davisfor which there is no process
2358269e767SBrooks Davisto read the data.
2368269e767SBrooks Davis.It Er 33 EDOM Em "Numerical argument out of domain" .
2378269e767SBrooks DavisA numerical input argument was outside the defined domain of the mathematical
2388269e767SBrooks Davisfunction.
2398269e767SBrooks Davis.It Er 34 ERANGE Em "Result too large" .
2408269e767SBrooks DavisA numerical result of the function was too large to fit in the
2418269e767SBrooks Davisavailable space (perhaps exceeded precision).
2428269e767SBrooks Davis.It Er 35 EAGAIN Em "Resource temporarily unavailable" .
2438269e767SBrooks DavisThis is a temporary condition and later calls to the
2448269e767SBrooks Davissame routine may complete normally.
2458269e767SBrooks Davis.It Er 36 EINPROGRESS Em "Operation now in progress" .
2468269e767SBrooks DavisAn operation that takes a long time to complete (such as
2478269e767SBrooks Davisa
2488269e767SBrooks Davis.Xr connect 2 )
2498269e767SBrooks Daviswas attempted on a non-blocking object (see
2508269e767SBrooks Davis.Xr fcntl 2 ) .
2518269e767SBrooks Davis.It Er 37 EALREADY Em "Operation already in progress" .
2528269e767SBrooks DavisAn operation was attempted on a non-blocking object that already
2538269e767SBrooks Davishad an operation in progress.
2548269e767SBrooks Davis.It Er 38 ENOTSOCK Em "Socket operation on non-socket" .
2558269e767SBrooks DavisSelf-explanatory.
2568269e767SBrooks Davis.It Er 39 EDESTADDRREQ Em "Destination address required" .
2578269e767SBrooks DavisA required address was omitted from an operation on a socket.
2588269e767SBrooks Davis.It Er 40 EMSGSIZE Em "Message too long" .
2598269e767SBrooks DavisA message sent on a socket was larger than the internal message buffer
2608269e767SBrooks Davisor some other network limit.
2618269e767SBrooks Davis.It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" .
2628269e767SBrooks DavisA protocol was specified that does not support the semantics of the
2638269e767SBrooks Davissocket type requested.
2648269e767SBrooks DavisFor example, you cannot use the
2658269e767SBrooks Davis.Tn ARPA
2668269e767SBrooks DavisInternet
2678269e767SBrooks Davis.Tn UDP
2688269e767SBrooks Davisprotocol with type
2698269e767SBrooks Davis.Dv SOCK_STREAM .
2708269e767SBrooks Davis.It Er 42 ENOPROTOOPT Em "Protocol not available" .
2718269e767SBrooks DavisA bad option or level was specified in a
2728269e767SBrooks Davis.Xr getsockopt 2
2738269e767SBrooks Davisor
2748269e767SBrooks Davis.Xr setsockopt 2
2758269e767SBrooks Daviscall.
2768269e767SBrooks Davis.It Er 43 EPROTONOSUPPORT Em "Protocol not supported" .
2778269e767SBrooks DavisThe protocol has not been configured into the
2788269e767SBrooks Davissystem or no implementation for it exists.
2798269e767SBrooks Davis.It Er 44 ESOCKTNOSUPPORT Em "Socket type not supported" .
2808269e767SBrooks DavisThe support for the socket type has not been configured into the
2818269e767SBrooks Davissystem or no implementation for it exists.
2828269e767SBrooks Davis.It Er 45 EOPNOTSUPP Em "Operation not supported" .
2838269e767SBrooks DavisThe attempted operation is not supported for the type of object referenced.
2848269e767SBrooks DavisUsually this occurs when a file descriptor refers to a file or socket
2858269e767SBrooks Davisthat cannot support this operation,
2868269e767SBrooks Davisfor example, trying to
2878269e767SBrooks Davis.Em accept
2888269e767SBrooks Davisa connection on a datagram socket.
2898269e767SBrooks Davis.It Er 46 EPFNOSUPPORT Em "Protocol family not supported" .
2908269e767SBrooks DavisThe protocol family has not been configured into the
2918269e767SBrooks Davissystem or no implementation for it exists.
2928269e767SBrooks Davis.It Er 47 EAFNOSUPPORT Em "Address family not supported by protocol family" .
2938269e767SBrooks DavisAn address incompatible with the requested protocol was used.
2948269e767SBrooks DavisFor example, you should not necessarily expect to be able to use
2958269e767SBrooks Davis.Tn NS
2968269e767SBrooks Davisaddresses with
2978269e767SBrooks Davis.Tn ARPA
2988269e767SBrooks DavisInternet protocols.
2998269e767SBrooks Davis.It Er 48 EADDRINUSE Em "Address already in use" .
3008269e767SBrooks DavisOnly one usage of each address is normally permitted.
3018269e767SBrooks Davis.It Er 49 EADDRNOTAVAIL Em "Can't assign requested address" .
3028269e767SBrooks DavisNormally results from an attempt to create a socket with an
3038269e767SBrooks Davisaddress not on this machine.
3048269e767SBrooks Davis.It Er 50 ENETDOWN Em "Network is down" .
3058269e767SBrooks DavisA socket operation encountered a dead network.
3068269e767SBrooks Davis.It Er 51 ENETUNREACH Em "Network is unreachable" .
3078269e767SBrooks DavisA socket operation was attempted to an unreachable network.
3088269e767SBrooks Davis.It Er 52 ENETRESET Em "Network dropped connection on reset" .
3098269e767SBrooks DavisThe host you were connected to crashed and rebooted.
3108269e767SBrooks Davis.It Er 53 ECONNABORTED Em "Software caused connection abort" .
3118269e767SBrooks DavisA connection abort was caused internal to your host machine.
3128269e767SBrooks Davis.It Er 54 ECONNRESET Em "Connection reset by peer" .
3138269e767SBrooks DavisA connection was forcibly closed by a peer.
3148269e767SBrooks DavisThis normally
3158269e767SBrooks Davisresults from a loss of the connection on the remote socket
3168269e767SBrooks Davisdue to a timeout or a reboot.
3178269e767SBrooks Davis.It Er 55 ENOBUFS Em "\&No buffer space available" .
3188269e767SBrooks DavisAn operation on a socket or pipe was not performed because
3198269e767SBrooks Davisthe system lacked sufficient buffer space or because a queue was full.
3208269e767SBrooks Davis.It Er 56 EISCONN Em "Socket is already connected" .
3218269e767SBrooks DavisA
3228269e767SBrooks Davis.Xr connect 2
3238269e767SBrooks Davisrequest was made on an already connected socket; or,
3248269e767SBrooks Davisa
3258269e767SBrooks Davis.Xr sendto 2
3268269e767SBrooks Davisor
3278269e767SBrooks Davis.Xr sendmsg 2
3288269e767SBrooks Davisrequest on a connected socket specified a destination
3298269e767SBrooks Daviswhen already connected.
3308269e767SBrooks Davis.It Er 57 ENOTCONN Em "Socket is not connected" .
3318269e767SBrooks DavisAn request to send or receive data was disallowed because
3328269e767SBrooks Davisthe socket was not connected and (when sending on a datagram socket)
3338269e767SBrooks Davisno address was supplied.
3348269e767SBrooks Davis.It Er 58 ESHUTDOWN Em "Can't send after socket shutdown" .
3358269e767SBrooks DavisA request to send data was disallowed because the socket
3368269e767SBrooks Davishad already been shut down with a previous
3378269e767SBrooks Davis.Xr shutdown 2
3388269e767SBrooks Daviscall.
3398269e767SBrooks Davis.It Er 60 ETIMEDOUT Em "Operation timed out" .
3408269e767SBrooks DavisA
3418269e767SBrooks Davis.Xr connect 2
3428269e767SBrooks Davisor
3438269e767SBrooks Davis.Xr send 2
3448269e767SBrooks Davisrequest failed because the connected party did not
3458269e767SBrooks Davisproperly respond after a period of time.
3468269e767SBrooks Davis(The timeout
3478269e767SBrooks Davisperiod is dependent on the communication protocol.)
3488269e767SBrooks Davis.It Er 61 ECONNREFUSED Em "Connection refused" .
3498269e767SBrooks DavisNo connection could be made because the target machine actively
3508269e767SBrooks Davisrefused it.
3518269e767SBrooks DavisThis usually results from trying to connect
3528269e767SBrooks Davisto a service that is inactive on the foreign host.
3538269e767SBrooks Davis.It Er 62 ELOOP Em "Too many levels of symbolic links" .
3548269e767SBrooks DavisA path name lookup involved more than 32
3558269e767SBrooks Davis.Pq Dv MAXSYMLINKS
3568269e767SBrooks Davissymbolic links.
3578269e767SBrooks Davis.It Er 63 ENAMETOOLONG Em "File name too long" .
3588269e767SBrooks DavisA component of a path name exceeded
3598269e767SBrooks Davis.Brq Dv NAME_MAX
3608269e767SBrooks Davischaracters, or an entire
3618269e767SBrooks Davispath name exceeded
3628269e767SBrooks Davis.Brq Dv PATH_MAX
3638269e767SBrooks Davischaracters.
3648269e767SBrooks Davis(See also the description of
3658269e767SBrooks Davis.Dv _PC_NO_TRUNC
3668269e767SBrooks Davisin
3678269e767SBrooks Davis.Xr pathconf 2 . )
3688269e767SBrooks Davis.It Er 64 EHOSTDOWN Em "Host is down" .
3698269e767SBrooks DavisA socket operation failed because the destination host was down.
3708269e767SBrooks Davis.It Er 65 EHOSTUNREACH Em "No route to host" .
3718269e767SBrooks DavisA socket operation was attempted to an unreachable host.
3728269e767SBrooks Davis.It Er 66 ENOTEMPTY Em "Directory not empty" .
3738269e767SBrooks DavisA directory with entries other than
3748269e767SBrooks Davis.Ql .\&
3758269e767SBrooks Davisand
3768269e767SBrooks Davis.Ql ..\&
3778269e767SBrooks Daviswas supplied to a remove directory or rename call.
3788269e767SBrooks Davis.It Er 67 EPROCLIM Em "Too many processes" .
3798269e767SBrooks Davis.It Er 68 EUSERS Em "Too many users" .
3808269e767SBrooks DavisThe quota system ran out of table entries.
3818269e767SBrooks Davis.It Er 69 EDQUOT Em "Disc quota exceeded" .
3828269e767SBrooks DavisA
3838269e767SBrooks Davis.Xr write 2
3848269e767SBrooks Davisto an ordinary file, the creation of a
3858269e767SBrooks Davisdirectory or symbolic link, or the creation of a directory
3868269e767SBrooks Davisentry failed because the user's quota of disk blocks was
3878269e767SBrooks Davisexhausted, or the allocation of an inode for a newly
3888269e767SBrooks Daviscreated file failed because the user's quota of inodes
3898269e767SBrooks Daviswas exhausted.
3908269e767SBrooks Davis.It Er 70 ESTALE Em "Stale NFS file handle" .
3918269e767SBrooks DavisAn attempt was made to access an open file (on an
3928269e767SBrooks Davis.Tn NFS
3938269e767SBrooks Davisfile system)
3948269e767SBrooks Daviswhich is now unavailable as referenced by the file descriptor.
3958269e767SBrooks DavisThis may indicate the file was deleted on the
3968269e767SBrooks Davis.Tn NFS
3978269e767SBrooks Davisserver or some
3988269e767SBrooks Davisother catastrophic event occurred.
3998269e767SBrooks Davis.It Er 72 EBADRPC Em "RPC struct is bad" .
4008269e767SBrooks DavisExchange of
4018269e767SBrooks Davis.Tn RPC
4028269e767SBrooks Davisinformation was unsuccessful.
4038269e767SBrooks Davis.It Er 73 ERPCMISMATCH Em "RPC version wrong" .
4048269e767SBrooks DavisThe version of
4058269e767SBrooks Davis.Tn RPC
4068269e767SBrooks Davison the remote peer is not compatible with
4078269e767SBrooks Davisthe local version.
4088269e767SBrooks Davis.It Er 74 EPROGUNAVAIL Em "RPC prog. not avail" .
4098269e767SBrooks DavisThe requested program is not registered on the remote host.
4108269e767SBrooks Davis.It Er 75 EPROGMISMATCH Em "Program version wrong" .
4118269e767SBrooks DavisThe requested version of the program is not available
4128269e767SBrooks Davison the remote host
4138269e767SBrooks Davis.Pq Tn RPC .
4148269e767SBrooks Davis.It Er 76 EPROCUNAVAIL Em "Bad procedure for program" .
4158269e767SBrooks DavisAn
4168269e767SBrooks Davis.Tn RPC
4178269e767SBrooks Daviscall was attempted for a procedure which does not exist
4188269e767SBrooks Davisin the remote program.
4198269e767SBrooks Davis.It Er 77 ENOLCK Em "No locks available" .
4208269e767SBrooks DavisA system-imposed limit on the number of simultaneous file
4218269e767SBrooks Davislocks was reached.
4228269e767SBrooks Davis.It Er 78 ENOSYS Em "Function not implemented" .
4238269e767SBrooks DavisAttempted a system call that is not available on this
4248269e767SBrooks Davissystem.
4258269e767SBrooks Davis.It Er 79 EFTYPE Em "Inappropriate file type or format" .
4268269e767SBrooks DavisThe file was the wrong type for the operation, or a data file had
4278269e767SBrooks Davisthe wrong format.
4288269e767SBrooks Davis.It Er 80 EAUTH Em "Authentication error" .
4298269e767SBrooks DavisAttempted to use an invalid authentication ticket to mount a
4308269e767SBrooks Davis.Tn NFS
4318269e767SBrooks Davisfile system.
4328269e767SBrooks Davis.It Er 81 ENEEDAUTH Em "Need authenticator" .
4338269e767SBrooks DavisAn authentication ticket must be obtained before the given
4348269e767SBrooks Davis.Tn NFS
4358269e767SBrooks Davisfile system may be mounted.
4368269e767SBrooks Davis.It Er 82 EIDRM Em "Identifier removed" .
4378269e767SBrooks DavisAn IPC identifier was removed while the current process was waiting on it.
4388269e767SBrooks Davis.It Er 83 ENOMSG Em "No message of desired type" .
4398269e767SBrooks DavisAn IPC message queue does not contain a message of the desired type, or a
4408269e767SBrooks Davismessage catalog does not contain the requested message.
4418269e767SBrooks Davis.It Er 84 EOVERFLOW Em "Value too large to be stored in data type" .
4428269e767SBrooks DavisA numerical result of the function was too large to be stored in the caller
4438269e767SBrooks Davisprovided space.
4448269e767SBrooks Davis.It Er 85 ECANCELED Em "Operation canceled" .
4458269e767SBrooks DavisThe scheduled operation was canceled.
4468269e767SBrooks Davis.It Er 86 EILSEQ Em "Illegal byte sequence" .
4478269e767SBrooks DavisWhile decoding a multibyte character the function came along an
4488269e767SBrooks Davisinvalid or an incomplete sequence of bytes or the given wide
4498269e767SBrooks Davischaracter is invalid.
4508269e767SBrooks Davis.It Er 87 ENOATTR Em "Attribute not found" .
4518269e767SBrooks DavisThe specified extended attribute does not exist.
4528269e767SBrooks Davis.It Er 88 EDOOFUS Em "Programming error" .
4538269e767SBrooks DavisA function or API is being abused in a way which could only be detected
4548269e767SBrooks Davisat run-time.
4558269e767SBrooks Davis.It Er 89 EBADMSG Em "Bad message" .
4568269e767SBrooks DavisA corrupted message was detected.
4578269e767SBrooks Davis.It Er 90 EMULTIHOP Em "Multihop attempted" .
4588269e767SBrooks DavisThis error code is unused, but present for compatibility with other systems.
4598269e767SBrooks Davis.It Er 91 ENOLINK Em "Link has been severed" .
4608269e767SBrooks DavisThis error code is unused, but present for compatibility with other systems.
4618269e767SBrooks Davis.It Er 92 EPROTO Em "Protocol error" .
4628269e767SBrooks DavisA device or socket encountered an unrecoverable protocol error.
4638269e767SBrooks Davis.It Er 93 ENOTCAPABLE Em "Capabilities insufficient" .
4648269e767SBrooks DavisAn operation on a capability file descriptor requires greater privilege than
4658269e767SBrooks Davisthe capability allows.
4668269e767SBrooks Davis.It Er 94 ECAPMODE Em "Not permitted in capability mode" .
4678269e767SBrooks DavisThe system call or operation is not permitted for capability mode processes.
4688269e767SBrooks Davis.It Er 95 ENOTRECOVERABLE Em "State not recoverable" .
4698269e767SBrooks DavisThe state protected by a robust mutex is not recoverable.
4708269e767SBrooks Davis.It Er 96 EOWNERDEAD Em "Previous owner died" .
4718269e767SBrooks DavisThe owner of a robust mutex terminated while holding the mutex lock.
4728269e767SBrooks Davis.It Er 97 EINTEGRITY Em "Integrity check failed" .
4738269e767SBrooks DavisAn integrity check such as a check-hash or a cross-correlation failed.
4748269e767SBrooks DavisThe integrity error falls in the kernel I/O stack between
4758269e767SBrooks Davis.Er EINVAL
4768269e767SBrooks Davisthat identifies errors in parameters to a system call and
4778269e767SBrooks Davis.Er EIO
4788269e767SBrooks Davisthat identifies errors with the underlying storage media.
4798269e767SBrooks DavisIt is typically raised by intermediate kernel layers such as a
4808269e767SBrooks Davisfilesystem or an in-kernel GEOM subsystem when they detect inconsistencies.
4818269e767SBrooks DavisUses include allowing the
4828269e767SBrooks Davis.Xr mount 8
4838269e767SBrooks Daviscommand to return a different exit value to automate the running of
4848269e767SBrooks Davis.Xr fsck 8
4858269e767SBrooks Davisduring a system boot.
4868269e767SBrooks Davis.El
4878269e767SBrooks Davis.Sh DEFINITIONS
4888269e767SBrooks Davis.Bl -tag -width Ds
4898269e767SBrooks Davis.It Process ID .
4908269e767SBrooks DavisEach active process in the system is uniquely identified by a non-negative
4918269e767SBrooks Davisinteger called a process ID.
4928269e767SBrooks DavisThe range of this ID is from 0 to 99999.
4938269e767SBrooks Davis.It Parent process ID
4948269e767SBrooks DavisA new process is created by a currently active process (see
4958269e767SBrooks Davis.Xr fork 2 ) .
4968269e767SBrooks DavisThe parent process ID of a process is initially the process ID of its creator.
4978269e767SBrooks DavisIf the creating process exits,
4988269e767SBrooks Davisthe parent process ID of each child is set to the ID of the calling process's
4998269e767SBrooks Davisreaper (see
5008269e767SBrooks Davis.Xr procctl 2 ) ,
5018269e767SBrooks Davisnormally
5028269e767SBrooks Davis.Xr init 8 .
5038269e767SBrooks Davis.It Process Group
5048269e767SBrooks DavisEach active process is a member of a process group that is identified by
5058269e767SBrooks Davisa non-negative integer called the process group ID.
5068269e767SBrooks DavisThis is the process
5078269e767SBrooks DavisID of the group leader.
5088269e767SBrooks DavisThis grouping permits the signaling of related
5098269e767SBrooks Davisprocesses (see
5108269e767SBrooks Davis.Xr termios 4 )
5118269e767SBrooks Davisand the job control mechanisms of
5128269e767SBrooks Davis.Xr csh 1 .
5138269e767SBrooks Davis.It Session
5148269e767SBrooks DavisA session is a set of one or more process groups.
5158269e767SBrooks DavisA session is created by a successful call to
5168269e767SBrooks Davis.Xr setsid 2 ,
5178269e767SBrooks Daviswhich causes the caller to become the only member of the only process
5188269e767SBrooks Davisgroup in the new session.
5198269e767SBrooks Davis.It Session leader
5208269e767SBrooks DavisA process that has created a new session by a successful call to
5218269e767SBrooks Davis.Xr setsid 2 ,
5228269e767SBrooks Davisis known as a session leader.
5238269e767SBrooks DavisOnly a session leader may acquire a terminal as its controlling terminal (see
5248269e767SBrooks Davis.Xr termios 4 ) .
5258269e767SBrooks Davis.It Controlling process
5268269e767SBrooks DavisA session leader with a controlling terminal is a controlling process.
5278269e767SBrooks Davis.It Controlling terminal
5288269e767SBrooks DavisA terminal that is associated with a session is known as the controlling
5298269e767SBrooks Davisterminal for that session and its members.
5308269e767SBrooks Davis.It "Terminal Process Group ID"
5318269e767SBrooks DavisA terminal may be acquired by a session leader as its controlling terminal.
5328269e767SBrooks DavisOnce a terminal is associated with a session, any of the process groups
5338269e767SBrooks Daviswithin the session may be placed into the foreground by setting
5348269e767SBrooks Davisthe terminal process group ID to the ID of the process group.
5358269e767SBrooks DavisThis facility is used
5368269e767SBrooks Davisto arbitrate between multiple jobs contending for the same terminal;
5378269e767SBrooks Davis(see
5388269e767SBrooks Davis.Xr csh 1
5398269e767SBrooks Davisand
5408269e767SBrooks Davis.Xr tty 4 ) .
5418269e767SBrooks Davis.It "Orphaned Process Group"
5428269e767SBrooks DavisA process group is considered to be
5438269e767SBrooks Davis.Em orphaned
5448269e767SBrooks Davisif it is not under the control of a job control shell.
5458269e767SBrooks DavisMore precisely, a process group is orphaned
5468269e767SBrooks Daviswhen none of its members has a parent process that is in the same session
5478269e767SBrooks Davisas the group,
5488269e767SBrooks Davisbut is in a different process group.
5498269e767SBrooks DavisNote that when a process exits, the parent process for its children
5508269e767SBrooks Davisis normally changed to be
5518269e767SBrooks Davis.Xr init 8 ,
5528269e767SBrooks Daviswhich is in a separate session.
5538269e767SBrooks DavisNot all members of an orphaned process group are necessarily orphaned
5548269e767SBrooks Davisprocesses (those whose creating process has exited).
5558269e767SBrooks DavisThe process group of a session leader is orphaned by definition.
5568269e767SBrooks Davis.It "Real User ID and Real Group ID"
5578269e767SBrooks DavisEach user on the system is identified by a positive integer
5588269e767SBrooks Davistermed the real user ID.
5598269e767SBrooks Davis.Pp
5608269e767SBrooks DavisEach user is also a member of one or more groups.
5618269e767SBrooks DavisOne of these groups is distinguished from others and
5628269e767SBrooks Davisused in implementing accounting facilities.
5638269e767SBrooks DavisThe positive
5648269e767SBrooks Davisinteger corresponding to this distinguished group is termed
5658269e767SBrooks Davisthe real group ID.
5668269e767SBrooks Davis.Pp
5678269e767SBrooks DavisAll processes have a real user ID and real group ID.
5688269e767SBrooks DavisThese are initialized from the equivalent attributes
5698269e767SBrooks Davisof the process that created it.
5708269e767SBrooks Davis.It "Effective User Id, Effective Group Id, and Group Access List"
5718269e767SBrooks DavisAccess to system resources is governed by two values:
5728269e767SBrooks Davisthe effective user ID, and the group access list.
5738269e767SBrooks DavisThe first member of the group access list is also known as the
5748269e767SBrooks Daviseffective group ID.
5758269e767SBrooks Davis(In POSIX.1, the group access list is known as the set of supplementary
5768269e767SBrooks Davisgroup IDs, and it is unspecified whether the effective group ID is
5778269e767SBrooks Davisa member of the list.)
5788269e767SBrooks Davis.Pp
5798269e767SBrooks DavisThe effective user ID and effective group ID are initially the
5808269e767SBrooks Davisprocess's real user ID and real group ID respectively.
5818269e767SBrooks DavisEither
5828269e767SBrooks Davismay be modified through execution of a set-user-ID or set-group-ID
5838269e767SBrooks Davisfile (possibly by one its ancestors) (see
5848269e767SBrooks Davis.Xr execve 2 ) .
5858269e767SBrooks DavisBy convention, the effective group ID (the first member of the group access
5868269e767SBrooks Davislist) is duplicated, so that the execution of a set-group-ID program
5878269e767SBrooks Davisdoes not result in the loss of the original (real) group ID.
5888269e767SBrooks Davis.Pp
5898269e767SBrooks DavisThe group access list is a set of group IDs
5908269e767SBrooks Davisused only in determining resource accessibility.
5918269e767SBrooks DavisAccess checks
5928269e767SBrooks Davisare performed as described below in ``File Access Permissions''.
5938269e767SBrooks Davis.It "Saved Set User ID and Saved Set Group ID"
5948269e767SBrooks DavisWhen a process executes a new file, the effective user ID is set
5958269e767SBrooks Davisto the owner of the file if the file is set-user-ID, and the effective
5968269e767SBrooks Davisgroup ID (first element of the group access list) is set to the group
5978269e767SBrooks Davisof the file if the file is set-group-ID.
5988269e767SBrooks DavisThe effective user ID of the process is then recorded as the saved set-user-ID,
5998269e767SBrooks Davisand the effective group ID of the process is recorded as the saved set-group-ID.
6008269e767SBrooks DavisThese values may be used to regain those values as the effective user
6018269e767SBrooks Davisor group ID after reverting to the real ID (see
6028269e767SBrooks Davis.Xr setuid 2 ) .
6038269e767SBrooks Davis(In POSIX.1, the saved set-user-ID and saved set-group-ID are optional,
6048269e767SBrooks Davisand are used in setuid and setgid, but this does not work as desired
6058269e767SBrooks Davisfor the super-user.)
6068269e767SBrooks Davis.It Super-user
6078269e767SBrooks DavisA process is recognized as a
6088269e767SBrooks Davis.Em super-user
6098269e767SBrooks Davisprocess and is granted special privileges if its effective user ID is 0.
6108269e767SBrooks Davis.It Descriptor
6118269e767SBrooks DavisAn integer assigned by the system when a file is referenced
6128269e767SBrooks Davisby
6138269e767SBrooks Davis.Xr open 2
6148269e767SBrooks Davisor
6158269e767SBrooks Davis.Xr dup 2 ,
6168269e767SBrooks Davisor when a socket is created by
6178269e767SBrooks Davis.Xr pipe 2 ,
6188269e767SBrooks Davis.Xr socket 2
6198269e767SBrooks Davisor
6208269e767SBrooks Davis.Xr socketpair 2 ,
6218269e767SBrooks Daviswhich uniquely identifies an access path to that file or socket from
6228269e767SBrooks Davisa given process or any of its children.
6238269e767SBrooks Davis.It File Name
6248269e767SBrooks DavisNames consisting of up to
6258269e767SBrooks Davis.Brq Dv NAME_MAX
6268269e767SBrooks Davischaracters may be used to name
6278269e767SBrooks Davisan ordinary file, special file, or directory.
6288269e767SBrooks Davis.Pp
6298269e767SBrooks DavisThese characters may be arbitrary eight-bit values,
6308269e767SBrooks Davisexcluding
6318269e767SBrooks Davis.Dv NUL
6328269e767SBrooks Davis.Tn ( ASCII
6338269e767SBrooks Davis0) and the
6348269e767SBrooks Davis.Ql \&/
6358269e767SBrooks Davischaracter (slash,
6368269e767SBrooks Davis.Tn ASCII
6378269e767SBrooks Davis47).
6388269e767SBrooks Davis.Pp
6398269e767SBrooks DavisNote that it is generally unwise to use
6408269e767SBrooks Davis.Ql \&* ,
6418269e767SBrooks Davis.Ql \&? ,
6428269e767SBrooks Davis.Ql \&[
6438269e767SBrooks Davisor
6448269e767SBrooks Davis.Ql \&]
6458269e767SBrooks Davisas part of
6468269e767SBrooks Davisfile names because of the special meaning attached to these characters
6478269e767SBrooks Davisby the shell.
6488269e767SBrooks Davis.It Path Name
6498269e767SBrooks DavisA path name is a
6508269e767SBrooks Davis.Dv NUL Ns -terminated
6518269e767SBrooks Davischaracter string starting with an
6528269e767SBrooks Davisoptional slash
6538269e767SBrooks Davis.Ql \&/ ,
6548269e767SBrooks Davisfollowed by zero or more directory names separated
6558269e767SBrooks Davisby slashes, optionally followed by a file name.
6568269e767SBrooks DavisThe total length of a path name must be less than
6578269e767SBrooks Davis.Brq Dv PATH_MAX
6588269e767SBrooks Davischaracters.
6598269e767SBrooks Davis(On some systems, this limit may be infinite.)
6608269e767SBrooks Davis.Pp
6618269e767SBrooks DavisIf a path name begins with a slash, the path search begins at the
6628269e767SBrooks Davis.Em root
6638269e767SBrooks Davisdirectory.
6648269e767SBrooks DavisOtherwise, the search begins from the current working directory.
6658269e767SBrooks DavisA slash by itself names the root directory.
6668269e767SBrooks DavisAn empty
6678269e767SBrooks Davispathname refers to the current directory.
6688269e767SBrooks Davis.It Directory
6698269e767SBrooks DavisA directory is a special type of file that contains entries
6708269e767SBrooks Davisthat are references to other files.
6718269e767SBrooks DavisDirectory entries are called links.
6728269e767SBrooks DavisBy convention, a directory
6738269e767SBrooks Daviscontains at least two links,
6748269e767SBrooks Davis.Ql .\&
6758269e767SBrooks Davisand
6768269e767SBrooks Davis.Ql \&.. ,
6778269e767SBrooks Davisreferred to as
6788269e767SBrooks Davis.Em dot
6798269e767SBrooks Davisand
6808269e767SBrooks Davis.Em dot-dot
6818269e767SBrooks Davisrespectively.
6828269e767SBrooks DavisDot refers to the directory itself and
6838269e767SBrooks Davisdot-dot refers to its parent directory.
6848269e767SBrooks Davis.It "Root Directory and Current Working Directory"
6858269e767SBrooks DavisEach process has associated with it a concept of a root directory
6868269e767SBrooks Davisand a current working directory for the purpose of resolving path
6878269e767SBrooks Davisname searches.
6888269e767SBrooks DavisA process's root directory need not be the root
6898269e767SBrooks Davisdirectory of the root file system.
6908269e767SBrooks Davis.It File Access Permissions
6918269e767SBrooks DavisEvery file in the file system has a set of access permissions.
6928269e767SBrooks DavisThese permissions are used in determining whether a process
6938269e767SBrooks Davismay perform a requested operation on the file (such as opening
6948269e767SBrooks Davisa file for writing).
6958269e767SBrooks DavisAccess permissions are established at the
6968269e767SBrooks Davistime a file is created.
6978269e767SBrooks DavisThey may be changed at some later time
6988269e767SBrooks Davisthrough the
6998269e767SBrooks Davis.Xr chmod 2
7008269e767SBrooks Daviscall.
7018269e767SBrooks Davis.Pp
7028269e767SBrooks DavisFile access is broken down according to whether a file may be: read,
7038269e767SBrooks Daviswritten, or executed.
7048269e767SBrooks DavisDirectory files use the execute
7058269e767SBrooks Davispermission to control if the directory may be searched.
7068269e767SBrooks Davis.Pp
7078269e767SBrooks DavisFile access permissions are interpreted by the system as
7088269e767SBrooks Davisthey apply to three different classes of users: the owner
7098269e767SBrooks Davisof the file, those users in the file's group, anyone else.
7108269e767SBrooks DavisEvery file has an independent set of access permissions for
7118269e767SBrooks Daviseach of these classes.
7128269e767SBrooks DavisWhen an access check is made, the system
7138269e767SBrooks Davisdecides if permission should be granted by checking the access
7148269e767SBrooks Davisinformation applicable to the caller.
7158269e767SBrooks Davis.Pp
7168269e767SBrooks DavisRead, write, and execute/search permissions on
7178269e767SBrooks Davisa file are granted to a process if:
7188269e767SBrooks Davis.Pp
7198269e767SBrooks DavisThe process's effective user ID is that of the super-user.
7208269e767SBrooks Davis(Note:
7218269e767SBrooks Daviseven the super-user cannot execute a non-executable file.)
7228269e767SBrooks Davis.Pp
7238269e767SBrooks DavisThe process's effective user ID matches the user ID of the owner
7248269e767SBrooks Davisof the file and the owner permissions allow the access.
7258269e767SBrooks Davis.Pp
7268269e767SBrooks DavisThe process's effective user ID does not match the user ID of the
7278269e767SBrooks Davisowner of the file, and either the process's effective
7288269e767SBrooks Davisgroup ID matches the group ID
7298269e767SBrooks Davisof the file, or the group ID of the file is in
7308269e767SBrooks Davisthe process's group access list,
7318269e767SBrooks Davisand the group permissions allow the access.
7328269e767SBrooks Davis.Pp
7338269e767SBrooks DavisNeither the effective user ID nor effective group ID
7348269e767SBrooks Davisand group access list of the process
7358269e767SBrooks Davismatch the corresponding user ID and group ID of the file,
7368269e767SBrooks Davisbut the permissions for ``other users'' allow access.
7378269e767SBrooks Davis.Pp
7388269e767SBrooks DavisOtherwise, permission is denied.
7398269e767SBrooks Davis.It Sockets and Address Families
7408269e767SBrooks DavisA socket is an endpoint for communication between processes.
7418269e767SBrooks DavisEach socket has queues for sending and receiving data.
7428269e767SBrooks Davis.Pp
7438269e767SBrooks DavisSockets are typed according to their communications properties.
7448269e767SBrooks DavisThese properties include whether messages sent and received
7458269e767SBrooks Davisat a socket require the name of the partner, whether communication
7468269e767SBrooks Davisis reliable, the format used in naming message recipients, etc.
7478269e767SBrooks Davis.Pp
7488269e767SBrooks DavisEach instance of the system supports some
7498269e767SBrooks Daviscollection of socket types; consult
7508269e767SBrooks Davis.Xr socket 2
7518269e767SBrooks Davisfor more information about the types available and
7528269e767SBrooks Davistheir properties.
7538269e767SBrooks Davis.Pp
7548269e767SBrooks DavisEach instance of the system supports some number of sets of
7558269e767SBrooks Daviscommunications protocols.
7568269e767SBrooks DavisEach protocol set supports addresses
7578269e767SBrooks Davisof a certain format.
7588269e767SBrooks DavisAn Address Family is the set of addresses
7598269e767SBrooks Davisfor a specific group of protocols.
7608269e767SBrooks DavisEach socket has an address
7618269e767SBrooks Davischosen from the address family in which the socket was created.
7628269e767SBrooks Davis.El
7638269e767SBrooks Davis.Sh SEE ALSO
7648269e767SBrooks Davis.Xr intro 3 ,
7658269e767SBrooks Davis.Xr perror 3
766*bcc57e97SAlexander Ziaee.Sh HISTORY
767*bcc57e97SAlexander ZiaeeThe
768*bcc57e97SAlexander Ziaee.Nm Ns Pq 2
769*bcc57e97SAlexander Ziaeemanual page first appeared in
770*bcc57e97SAlexander Ziaee.At v5 .
771