Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wait3(3) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

exit(2)

fork(2)

pause(2)

waitpid(2)

wait(5)

wait3(3)                (BSD Compatibility Package)                wait3(3)

NAME
     wait3 - wait for process to terminate or stop

SYNOPSIS
     /usr/ucb/cc [flag ...] file ... -lucb

     #include <sys/wait.h>

     pidt wait3(int *statloc, int options, struct rusage *resourceusage);

DESCRIPTION
     The wait3 function allows the calling process to obtain status infor-
     mation for specified child processes.

     The following call:

          wait3(statloc, options, resourceusage);

     is equivalent to the call:

          waitpid((pidt)-1, statloc, options);

     except that on successful completion, if the resourceusage argument
     to wait3 is not a null pointer, the rusage structure that the third
     arguments points to is filled in for the child process identified by
     the return value.

RETURN VALUE
     If wait3() returns because the status of a child process is available,
     it will return a value equal to the process ID of the child process
     for which status is reported. If wait3() returns due to the delivery
     of a signal to the calling process, -1 will be returned and errno will
     be set to EINTR. If waitpid() was invoked with WNOHANG set in options,
     it has at least one child process specified by pid for which status is
     not available, and status is not available for any process specified
     by pid, 0 will be returned. Otherwise, (pidt)-1 will be returned, and
     errno will be set to indicate the error.

DIAGNOSTICS
     In addition to the error conditions specified on waitpid(2), under the
     following conditions, wait3 may fail and set errno to:

     ECHILD    The calling process has no existing unwaited-for child
               processes, or if the set of processes specified by the argu-
               ment pid can never be in the states specified by the argu-
               ment options.

SEE ALSO
     exec(2), exit(2), fork(2), pause(2), waitpid(2), wait(5).






Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026