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).
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index 9af5889..8c4b770 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -1731,6 +1731,27 @@
 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