diff options
Diffstat (limited to 'man2/wait.2')
-rw-r--r-- | man2/wait.2 | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/man2/wait.2 b/man2/wait.2 index 2e0e9c254..c4ea1ddce 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -47,7 +47,7 @@ Standard C library .P .RS -4 Feature Test Macro Requirements for glibc (see -.BR feature_test_macros (7)): +.MR feature_test_macros 7 ): .RE .P .BR waitid (): @@ -77,7 +77,7 @@ a signal handler interrupts the call (assuming that system calls are not automatically restarted using the .B SA_RESTART flag of -.BR sigaction (2)). +.MR sigaction 2 ). In the remainder of this page, a child whose state has changed and which has not yet been waited upon by one of these system calls is termed @@ -142,7 +142,7 @@ return immediately if no child has exited. .B WUNTRACED also return if a child has stopped (but not traced via -.BR ptrace (2)). +.MR ptrace 2 ). Status for .I traced children which have stopped is provided @@ -171,9 +171,9 @@ and .BI WIFEXITED( wstatus ) returns true if the child terminated normally, that is, by calling -.BR exit (3) +.MR exit 3 or -.BR _exit (2), +.MR _exit 2 , or by returning from main(). .TP .BI WEXITSTATUS( wstatus ) @@ -181,9 +181,9 @@ returns the exit status of the child. This consists of the least significant 8 bits of the .I status argument that the child specified in a call to -.BR exit (3) +.MR exit 3 or -.BR _exit (2) +.MR _exit 2 or as the argument for a return statement in main(). This macro should be employed only if .B WIFEXITED @@ -201,7 +201,7 @@ returned true. .TP .BI WCOREDUMP( wstatus ) returns true if the child produced a core dump (see -.BR core (5)). +.MR core 5 ). This macro should be employed only if .B WIFSIGNALED returned true. @@ -216,7 +216,7 @@ returns true if the child process was stopped by delivery of a signal; this is possible only if the call was done using .B WUNTRACED or when the child is being traced (see -.BR ptrace (2)). +.MR ptrace 2 ). .TP .BI WSTOPSIG( wstatus ) returns the number of the signal which caused the child to stop. @@ -249,7 +249,7 @@ Wait for the child whose process ID matches Wait for the child referred to by the PID file descriptor specified in .IR id . (See -.BR pidfd_open (2) +.MR pidfd_open 2 for further information on PID file descriptors.) .TP .IR idtype " == " \fBP_PGID\fP @@ -313,9 +313,9 @@ Always set to .TP \fIsi_status\fP Either the exit status of the child, as given to -.BR _exit (2) +.MR _exit 2 (or -.BR exit (3)), +.MR exit 3 ), or the signal that caused the child to terminate, stop, or continue. The .I si_code @@ -325,7 +325,7 @@ field can be used to determine how to interpret this field. Set to one of: .B CLD_EXITED (child called -.BR _exit (2)); +.MR _exit 2 ); .B CLD_KILLED (child killed by signal); .B CLD_DUMPED @@ -445,7 +445,7 @@ See also the \fILinux Notes\fP section about threads.) was not set and an unblocked signal or a .B SIGCHLD was caught; see -.BR signal (7). +.MR signal 7 . .TP .B EINVAL The @@ -464,7 +464,7 @@ is equal to .SS C library/kernel differences .BR wait () is actually a library function that (in glibc) is implemented as a call to -.BR wait4 (2). +.MR wait4 2 . .P On some architectures, there is no .BR waitpid () @@ -472,7 +472,7 @@ system call; .\" e.g., i386 has the system call, but not x86-64 instead, this interface is implemented via a C library wrapper function that calls -.BR wait4 (2). +.MR wait4 2 . .P The raw .BR waitid () @@ -481,9 +481,9 @@ system call takes a fifth argument, of type If this argument is non-NULL, then it is used to return resource usage information about the child, in the same manner as -.BR wait4 (2). +.MR wait4 2 . See -.BR getrusage (2) +.MR getrusage 2 for details. .SH STANDARDS POSIX.1-2008. @@ -500,12 +500,12 @@ it will consume a slot in the kernel process table, and if this table fills, it will not be possible to create further processes. If a parent process terminates, then its "zombie" children (if any) are adopted by -.BR init (1), +.MR init 1 , (or by the nearest "subreaper" process as defined through the use of the -.BR prctl (2) +.MR prctl 2 .B PR_SET_CHILD_SUBREAPER operation); -.BR init (1) +.MR init 1 automatically performs a wait to remove the zombies. .P POSIX.1-2001 specifies that if the disposition of @@ -517,7 +517,7 @@ or the flag is set for .B SIGCHLD (see -.BR sigaction (2)), +.MR sigaction 2 ), then children that terminate do not become zombies and a call to .BR wait () or @@ -554,11 +554,11 @@ In the Linux kernel, a kernel-scheduled thread is not a distinct construct from a process. Instead, a thread is simply a process that is created using the Linux-unique -.BR clone (2) +.MR clone 2 system call; other routines such as the portable -.BR pthread_create (3) +.MR pthread_create 3 call are implemented using -.BR clone (2). +.MR clone 2 . Before Linux 2.4, a thread was just a special case of a process, and as a consequence one thread could not wait on the children of another thread, even when the latter belongs to the same thread group. @@ -569,7 +569,7 @@ in the same thread group. The following Linux-specific .I options are for use with children created using -.BR clone (2); +.MR clone 2 ; they can also, since Linux 4.7, .\" commit 91c4e8ea8f05916df0c8a6f383508ac7c9e10dba be used with @@ -622,13 +622,13 @@ nonstandard, and unnecessary feature. .SH EXAMPLES .\" fork.2 refers to this example program. The following program demonstrates the use of -.BR fork (2) +.MR fork 2 and .BR waitpid (). The program creates a child process. If no command-line argument is supplied to the program, then the child suspends its execution using -.BR pause (2), +.MR pause 2 , to allow the user to send signals to the child. Otherwise, if a command-line argument is supplied, then the child exits immediately, @@ -706,15 +706,15 @@ main(int argc, char *argv[]) .EE .\" SRC END .SH SEE ALSO -.BR _exit (2), -.BR clone (2), -.BR fork (2), -.BR kill (2), -.BR ptrace (2), -.BR sigaction (2), -.BR signal (2), -.BR wait4 (2), -.BR pthread_create (3), -.BR core (5), -.BR credentials (7), -.BR signal (7) +.MR _exit 2 , +.MR clone 2 , +.MR fork 2 , +.MR kill 2 , +.MR ptrace 2 , +.MR sigaction 2 , +.MR signal 2 , +.MR wait4 2 , +.MR pthread_create 3 , +.MR core 5 , +.MR credentials 7 , +.MR signal 7 |