diff options
author | Roland McGrath <roland@gnu.org> | 1994-10-20 01:16:18 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-10-20 01:16:18 +0000 |
commit | c3bc96bf005201cde78f41de586ed4fac0bf8b4d (patch) | |
tree | fceb97408c2a6856f75b23770131f4d3e5341da2 /manual | |
parent | 9a61506b6cf3bf86b9c5c04da4dd2e9670ba27e4 (diff) |
(Process Completion): Move wait4 here from BSD compat section.
Diffstat (limited to 'manual')
-rw-r--r-- | manual/process.texi | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/manual/process.texi b/manual/process.texi index 565ea6de0f..4b76f9d72c 100644 --- a/manual/process.texi +++ b/manual/process.texi @@ -549,6 +549,19 @@ waitpid (-1, &status, 0) @end smallexample @end deftypefun +@comment sys/wait.h +@comment BSD +@deftypefun pid_t wait4 (pid_t @var{pid}, int *@var{status-ptr}, int @var{options}, struct rusage *@var{usage}) +If @var{usage} is a null pointer, @code{wait4} is equivalent to +@code{waitpid (@var{pid}, @var{status-ptr}, @var{options})}. + +If @var{usage} is not null, @code{wait4} stores usage figures for the +child process in @code{*@var{rusage}} (but only if the child has +terminated, not if it has stopped). @xref{Resource Usage}. + +This function is a BSD extension. +@end deftypefun + Here's an example of how to use @code{waitpid} to get the status from all child processes that have terminated, without ever waiting. This function is designed to be a handler for @code{SIGCHLD}, the signal that @@ -680,6 +693,9 @@ Instead of accessing these members directly, you should use the equivalent macros. @end deftp +The @code{wait3} function is the predecessor to @code{wait4}, which is +more flexible. @code{wait3} is now obsolete. + @comment sys/wait.h @comment BSD @deftypefun pid_t wait3 (union wait *@var{status-ptr}, int @var{options}, struct rusage *@var{usage}) @@ -691,17 +707,6 @@ child process in @code{*@var{rusage}} (but only if the child has terminated, not if it has stopped). @xref{Resource Usage}. @end deftypefun -@comment sys/wait.h -@comment BSD -@deftypefun pid_t wait4 (pid_t @var{pid}, union wait *@var{status-ptr}, int @var{options}, struct rusage *@var{usage}) -If @var{usage} is a null pointer, @code{wait4} is equivalent to -@code{waitpid (@var{pid}, @var{status-ptr}, @var{options})}. - -If @var{usage} is not null, @code{wait4} stores usage figures for the -child process in @code{*@var{rusage}} (but only if the child has -terminated, not if it has stopped). @xref{Resource Usage}. -@end deftypefun - @node Process Creation Example @section Process Creation Example |