Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.

This was a fair amount of rework of the patch.  Refactored test_fork1 so it
could be reused by the new tests for wait3/4.  Also made them into new style
unittests (derive from unittest.TestCase).
This commit is contained in:
Neal Norwitz 2006-03-20 06:30:08 +00:00
parent 910b5eec07
commit 05a45599d7
11 changed files with 307 additions and 67 deletions

View file

@ -1731,6 +1731,27 @@ The \function{spawn()} functions called with \constant{P_NOWAIT}
return suitable process handles.
\end{funcdesc}
\begin{funcdesc}{wait3}{\{optional{options}}
Similar to \function{waitpid()}, except no process id argument is given and
a 3-element tuple containing the child's process id, exit status indication,
and resource usage information is returned. Refer to
\module{resource}.\function{getrusage()}
for details on resource usage information. The option argument is the same
as that provided to \function{waitpid()} and \function{wait4()}.
Availability: \UNIX.
\versionadded{2.5}
\end{funcdesc}
\begin{funcdesc}{wait4}{pid, options}
Similar to \function{waitpid()}, except a 3-element tuple, containing the
child's process id, exit status indication, and resource usage information
is returned. Refer to \module{resource}.\function{getrusage()} for details
on resource usage information. The arguments to \function{wait4()} are
the same as those provided to \function{waitpid()}.
Availability: \UNIX.
\versionadded{2.5}
\end{funcdesc}
\begin{datadesc}{WNOHANG}
The option for \function{waitpid()} to return immediately if no child
process status is available immediately. The function returns