File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -745,12 +745,20 @@ \subsection{Process Management \label{os-process}}
745745\end {funcdesc }
746746
747747\begin {funcdesc }{waitpid}{pid, options}
748- Wait for completion of a child process given by process id, and return
749- a tuple containing its process id and exit status indication (encoded
750- as for \function {wait()}). The semantics of the call are affected by
751- the value of the integer \var {options}, which should be \code {0} for
752- normal operation.
753- Availability: \UNIX {}.
748+ Wait for completion of a child process given by process id \var {pid},
749+ and return a tuple containing its process id and exit status
750+ indication (encoded as for \function {wait()}). The semantics of the
751+ call are affected by the value of the integer \var {options}, which
752+ should be \code {0} for normal operation.
753+ Availability: \UNIX {}.
754+
755+ If \var {pid} is greater than \code {0}, \function {waitpid()} requests
756+ status information for that specific process. If \var {pid} is
757+ \code {0}, the request is for the status of any child in the process
758+ group of the current process. If \var {pid} is \code {-1}, the request
759+ pertains to any child of the current process. If \var {pid} is less
760+ than \code {-1}, status is requested for any process in the process
761+ group \code {-\var {pid}} (the absolute value of \var {pid}).
754762\end {funcdesc }
755763
756764\begin {datadesc }{WNOHANG}
You can’t perform that action at this time.
0 commit comments