wait for a child process to terminate or stop
cc . . . -lc
pid_t wait3(int *stat_loc, int options, struct rusage *resource_usage);
The wait3 function allows the calling process to obtain
status information for specified child processes. The following two
calls are equivalent:
wait3(stat_loc, options, resource_usage);
The only exception is that on successful completion, if the
resource_usage argument to wait3 is not a
NULL pointer, the rusage structure is filled in
for the child process identified by the return value (see
waitpid((pid_t)-1, stat_loc, options);
wait3 fails and returns immediately if one or more of the
following are true:
waitpid was interrupted due to the receipt of a signal
sent by the calling process.
An invalid value was specified for options.
The process or process group specified by pid does not
exist or is not a child of the calling process or can never be in
the states specified by options, or has no unwaited-for
wait3 is conformant with:
X/Open Portability Guide Issue 4, Version 2 (Spec-1170)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003