intro.2 (119893) | intro.2 (131504) |
---|---|
1.\" Copyright (c) 1980, 1983, 1986, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)intro.2 8.5 (Berkeley) 2/27/95 | 1.\" Copyright (c) 1980, 1983, 1986, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)intro.2 8.5 (Berkeley) 2/27/95 |
33.\" $FreeBSD: head/lib/libc/sys/intro.2 119893 2003-09-08 19:57:22Z ru $ | 33.\" $FreeBSD: head/lib/libc/sys/intro.2 131504 2004-07-02 23:52:20Z ru $ |
34.\" 35.Dd February 27, 1995 36.Dt INTRO 2 37.Os 38.Sh NAME 39.Nm intro 40.Nd introduction to system calls and error numbers 41.Sh LIBRARY --- 275 unchanged lines hidden (view full) --- 317A socket operation encountered a dead network. 318.It Er 51 ENETUNREACH Em "Network is unreachable" . 319A socket operation was attempted to an unreachable network. 320.It Er 52 ENETRESET Em "Network dropped connection on reset" . 321The host you were connected to crashed and rebooted. 322.It Er 53 ECONNABORTED Em "Software caused connection abort" . 323A connection abort was caused internal to your host machine. 324.It Er 54 ECONNRESET Em "Connection reset by peer" . | 34.\" 35.Dd February 27, 1995 36.Dt INTRO 2 37.Os 38.Sh NAME 39.Nm intro 40.Nd introduction to system calls and error numbers 41.Sh LIBRARY --- 275 unchanged lines hidden (view full) --- 317A socket operation encountered a dead network. 318.It Er 51 ENETUNREACH Em "Network is unreachable" . 319A socket operation was attempted to an unreachable network. 320.It Er 52 ENETRESET Em "Network dropped connection on reset" . 321The host you were connected to crashed and rebooted. 322.It Er 53 ECONNABORTED Em "Software caused connection abort" . 323A connection abort was caused internal to your host machine. 324.It Er 54 ECONNRESET Em "Connection reset by peer" . |
325A connection was forcibly closed by a peer. This normally | 325A connection was forcibly closed by a peer. 326This normally |
326results from a loss of the connection on the remote socket 327due to a timeout or a reboot. 328.It Er 55 ENOBUFS Em "\&No buffer space available" . 329An operation on a socket or pipe was not performed because 330the system lacked sufficient buffer space or because a queue was full. 331.It Er 56 EISCONN Em "Socket is already connected" . 332A 333.Xr connect 2 --- 14 unchanged lines hidden (view full) --- 348.Xr shutdown 2 349call. 350.It Er 60 ETIMEDOUT Em "Operation timed out" . 351A 352.Xr connect 2 353or 354.Xr send 2 355request failed because the connected party did not | 327results from a loss of the connection on the remote socket 328due to a timeout or a reboot. 329.It Er 55 ENOBUFS Em "\&No buffer space available" . 330An operation on a socket or pipe was not performed because 331the system lacked sufficient buffer space or because a queue was full. 332.It Er 56 EISCONN Em "Socket is already connected" . 333A 334.Xr connect 2 --- 14 unchanged lines hidden (view full) --- 349.Xr shutdown 2 350call. 351.It Er 60 ETIMEDOUT Em "Operation timed out" . 352A 353.Xr connect 2 354or 355.Xr send 2 356request failed because the connected party did not |
356properly respond after a period of time. (The timeout | 357properly respond after a period of time. 358(The timeout |
357period is dependent on the communication protocol.) 358.It Er 61 ECONNREFUSED Em "Connection refused" . 359No connection could be made because the target machine actively | 359period is dependent on the communication protocol.) 360.It Er 61 ECONNREFUSED Em "Connection refused" . 361No connection could be made because the target machine actively |
360refused it. This usually results from trying to connect | 362refused it. 363This usually results from trying to connect |
361to a service that is inactive on the foreign host. 362.It Er 62 ELOOP Em "Too many levels of symbolic links" . 363A path name lookup involved more than 32 364.Pq Dv MAXSYMLINKS 365symbolic links. 366.It Er 63 ENAMETOOLONG Em "File name too long" . 367A component of a path name exceeded 255 368.Pq Dv MAXNAMELEN --- 88 unchanged lines hidden (view full) --- 457.It Er 88 EDOOFUS Em "Programming error" . 458A function or API is being abused in a way which could only be detected 459at run-time. 460.El 461.Sh DEFINITIONS 462.Bl -tag -width Ds 463.It Process ID . 464Each active process in the system is uniquely identified by a non-negative | 364to a service that is inactive on the foreign host. 365.It Er 62 ELOOP Em "Too many levels of symbolic links" . 366A path name lookup involved more than 32 367.Pq Dv MAXSYMLINKS 368symbolic links. 369.It Er 63 ENAMETOOLONG Em "File name too long" . 370A component of a path name exceeded 255 371.Pq Dv MAXNAMELEN --- 88 unchanged lines hidden (view full) --- 460.It Er 88 EDOOFUS Em "Programming error" . 461A function or API is being abused in a way which could only be detected 462at run-time. 463.El 464.Sh DEFINITIONS 465.Bl -tag -width Ds 466.It Process ID . 467Each active process in the system is uniquely identified by a non-negative |
465integer called a process ID. The range of this ID is from 0 to 99999. | 468integer called a process ID. 469The range of this ID is from 0 to 99999. |
466.It Parent process ID 467A new process is created by a currently active process; (see 468.Xr fork 2 ) . 469The parent process ID of a process is initially the process ID of its creator. 470If the creating process exits, 471the parent process ID of each child is set to the ID of a system process, 472.Xr init 8 . 473.It Process Group 474Each active process is a member of a process group that is identified by | 470.It Parent process ID 471A new process is created by a currently active process; (see 472.Xr fork 2 ) . 473The parent process ID of a process is initially the process ID of its creator. 474If the creating process exits, 475the parent process ID of each child is set to the ID of a system process, 476.Xr init 8 . 477.It Process Group 478Each active process is a member of a process group that is identified by |
475a non-negative integer called the process group ID. This is the process 476ID of the group leader. This grouping permits the signaling of related | 479a non-negative integer called the process group ID. 480This is the process 481ID of the group leader. 482This grouping permits the signaling of related |
477processes (see 478.Xr termios 4 ) 479and the job control mechanisms of 480.Xr csh 1 . 481.It Session 482A session is a set of one or more process groups. 483A session is created by a successful call to 484.Xr setsid 2 , --- 37 unchanged lines hidden (view full) --- 522processes (those whose creating process has exited). 523The process group of a session leader is orphaned by definition. 524.It "Real User ID and Real Group ID" 525Each user on the system is identified by a positive integer 526termed the real user ID. 527.Pp 528Each user is also a member of one or more groups. 529One of these groups is distinguished from others and | 483processes (see 484.Xr termios 4 ) 485and the job control mechanisms of 486.Xr csh 1 . 487.It Session 488A session is a set of one or more process groups. 489A session is created by a successful call to 490.Xr setsid 2 , --- 37 unchanged lines hidden (view full) --- 528processes (those whose creating process has exited). 529The process group of a session leader is orphaned by definition. 530.It "Real User ID and Real Group ID" 531Each user on the system is identified by a positive integer 532termed the real user ID. 533.Pp 534Each user is also a member of one or more groups. 535One of these groups is distinguished from others and |
530used in implementing accounting facilities. The positive | 536used in implementing accounting facilities. 537The positive |
531integer corresponding to this distinguished group is termed 532the real group ID. 533.Pp 534All processes have a real user ID and real group ID. 535These are initialized from the equivalent attributes 536of the process that created it. 537.It "Effective User Id, Effective Group Id, and Group Access List" 538Access to system resources is governed by two values: 539the effective user ID, and the group access list. 540The first member of the group access list is also known as the 541effective group ID. 542(In POSIX.1, the group access list is known as the set of supplementary 543group IDs, and it is unspecified whether the effective group ID is 544a member of the list.) 545.Pp 546The effective user ID and effective group ID are initially the | 538integer corresponding to this distinguished group is termed 539the real group ID. 540.Pp 541All processes have a real user ID and real group ID. 542These are initialized from the equivalent attributes 543of the process that created it. 544.It "Effective User Id, Effective Group Id, and Group Access List" 545Access to system resources is governed by two values: 546the effective user ID, and the group access list. 547The first member of the group access list is also known as the 548effective group ID. 549(In POSIX.1, the group access list is known as the set of supplementary 550group IDs, and it is unspecified whether the effective group ID is 551a member of the list.) 552.Pp 553The effective user ID and effective group ID are initially the |
547process's real user ID and real group ID respectively. Either | 554process's real user ID and real group ID respectively. 555Either |
548may be modified through execution of a set-user-ID or set-group-ID 549file (possibly by one its ancestors) (see 550.Xr execve 2 ) . 551By convention, the effective group ID (the first member of the group access 552list) is duplicated, so that the execution of a set-group-ID program 553does not result in the loss of the original (real) group ID. 554.Pp 555The group access list is a set of group IDs | 556may be modified through execution of a set-user-ID or set-group-ID 557file (possibly by one its ancestors) (see 558.Xr execve 2 ) . 559By convention, the effective group ID (the first member of the group access 560list) is duplicated, so that the execution of a set-group-ID program 561does not result in the loss of the original (real) group ID. 562.Pp 563The group access list is a set of group IDs |
556used only in determining resource accessibility. Access checks | 564used only in determining resource accessibility. 565Access checks |
557are performed as described below in ``File Access Permissions''. 558.It "Saved Set User ID and Saved Set Group ID" 559When a process executes a new file, the effective user ID is set 560to the owner of the file if the file is set-user-ID, and the effective 561group ID (first element of the group access list) is set to the group 562of the file if the file is set-group-ID. 563The effective user ID of the process is then recorded as the saved set-user-ID, 564and the effective group ID of the process is recorded as the saved set-group-ID. --- 55 unchanged lines hidden (view full) --- 620The total length of a path name must be less than 1024 621.Pq Dv MAXPATHLEN 622characters. 623.Pp 624If a path name begins with a slash, the path search begins at the 625.Em root 626directory. 627Otherwise, the search begins from the current working directory. | 566are performed as described below in ``File Access Permissions''. 567.It "Saved Set User ID and Saved Set Group ID" 568When a process executes a new file, the effective user ID is set 569to the owner of the file if the file is set-user-ID, and the effective 570group ID (first element of the group access list) is set to the group 571of the file if the file is set-group-ID. 572The effective user ID of the process is then recorded as the saved set-user-ID, 573and the effective group ID of the process is recorded as the saved set-group-ID. --- 55 unchanged lines hidden (view full) --- 629The total length of a path name must be less than 1024 630.Pq Dv MAXPATHLEN 631characters. 632.Pp 633If a path name begins with a slash, the path search begins at the 634.Em root 635directory. 636Otherwise, the search begins from the current working directory. |
628A slash by itself names the root directory. An empty | 637A slash by itself names the root directory. 638An empty |
629pathname refers to the current directory. 630.It Directory 631A directory is a special type of file that contains entries 632that are references to other files. | 639pathname refers to the current directory. 640.It Directory 641A directory is a special type of file that contains entries 642that are references to other files. |
633Directory entries are called links. By convention, a directory | 643Directory entries are called links. 644By convention, a directory |
634contains at least two links, 635.Ql .\& 636and 637.Ql \&.. , 638referred to as 639.Em dot 640and 641.Em dot-dot | 645contains at least two links, 646.Ql .\& 647and 648.Ql \&.. , 649referred to as 650.Em dot 651and 652.Em dot-dot |
642respectively. Dot refers to the directory itself and | 653respectively. 654Dot refers to the directory itself and |
643dot-dot refers to its parent directory. 644.It "Root Directory and Current Working Directory" 645Each process has associated with it a concept of a root directory 646and a current working directory for the purpose of resolving path | 655dot-dot refers to its parent directory. 656.It "Root Directory and Current Working Directory" 657Each process has associated with it a concept of a root directory 658and a current working directory for the purpose of resolving path |
647name searches. A process's root directory need not be the root | 659name searches. 660A process's root directory need not be the root |
648directory of the root file system. 649.It File Access Permissions 650Every file in the file system has a set of access permissions. 651These permissions are used in determining whether a process 652may perform a requested operation on the file (such as opening | 661directory of the root file system. 662.It File Access Permissions 663Every file in the file system has a set of access permissions. 664These permissions are used in determining whether a process 665may perform a requested operation on the file (such as opening |
653a file for writing). Access permissions are established at the 654time a file is created. They may be changed at some later time | 666a file for writing). 667Access permissions are established at the 668time a file is created. 669They may be changed at some later time |
655through the 656.Xr chmod 2 657call. 658.Pp 659File access is broken down according to whether a file may be: read, | 670through the 671.Xr chmod 2 672call. 673.Pp 674File access is broken down according to whether a file may be: read, |
660written, or executed. Directory files use the execute | 675written, or executed. 676Directory files use the execute |
661permission to control if the directory may be searched. 662.Pp 663File access permissions are interpreted by the system as 664they apply to three different classes of users: the owner 665of the file, those users in the file's group, anyone else. 666Every file has an independent set of access permissions for | 677permission to control if the directory may be searched. 678.Pp 679File access permissions are interpreted by the system as 680they apply to three different classes of users: the owner 681of the file, those users in the file's group, anyone else. 682Every file has an independent set of access permissions for |
667each of these classes. When an access check is made, the system | 683each of these classes. 684When an access check is made, the system |
668decides if permission should be granted by checking the access 669information applicable to the caller. 670.Pp 671Read, write, and execute/search permissions on 672a file are granted to a process if: 673.Pp 674The process's effective user ID is that of the super-user. 675(Note: --- 26 unchanged lines hidden (view full) --- 702.Pp 703Each instance of the system supports some 704collection of socket types; consult 705.Xr socket 2 706for more information about the types available and 707their properties. 708.Pp 709Each instance of the system supports some number of sets of | 685decides if permission should be granted by checking the access 686information applicable to the caller. 687.Pp 688Read, write, and execute/search permissions on 689a file are granted to a process if: 690.Pp 691The process's effective user ID is that of the super-user. 692(Note: --- 26 unchanged lines hidden (view full) --- 719.Pp 720Each instance of the system supports some 721collection of socket types; consult 722.Xr socket 2 723for more information about the types available and 724their properties. 725.Pp 726Each instance of the system supports some number of sets of |
710communications protocols. Each protocol set supports addresses 711of a certain format. An Address Family is the set of addresses 712for a specific group of protocols. Each socket has an address | 727communications protocols. 728Each protocol set supports addresses 729of a certain format. 730An Address Family is the set of addresses 731for a specific group of protocols. 732Each socket has an address |
713chosen from the address family in which the socket was created. 714.El 715.Sh SEE ALSO 716.Xr intro 3 , 717.Xr perror 3 | 733chosen from the address family in which the socket was created. 734.El 735.Sh SEE ALSO 736.Xr intro 3 , 737.Xr perror 3 |