From: Fred Drake Date: Mon, 1 Apr 2002 23:30:47 +0000 (+0000) Subject: Explain that os.spawn*() return the process handle on Windows. X-Git-Tag: v2.3c1~6171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dfb7a81c1bc80d8e4d1d8279d6df81aac4d01e6;p=python Explain that os.spawn*() return the process handle on Windows. Clarify that os.waitpid() on Windows takes a process handle, not a process ID. This closes SF bug #537582. --- diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex index 57394855af..8c819d9202 100644 --- a/Doc/lib/libos.tex +++ b/Doc/lib/libos.tex @@ -1029,7 +1029,9 @@ Execute the program \var{path} in a new process. If \var{mode} is \constant{P_NOWAIT}, this function returns the process ID of the new process; if \var{mode} is \constant{P_WAIT}, returns the process's exit code if it exits normally, or \code{-\var{signal}}, where -\var{signal} is the signal that killed the process. +\var{signal} is the signal that killed the process. On Windows, the +process ID will actually be the process handle, so can be used with +the \function{waitpid()} function. The \character{l} and \character{v} variants of the \function{spawn*()} functions differ in how command-line arguments are @@ -1184,7 +1186,7 @@ than \code{-1}, status is requested for any process in the process group \code{-\var{pid}} (the absolute value of \var{pid}). On Windows: -Wait for completion of a process given by process id \var{pid}, +Wait for completion of a process given by process handle \var{pid}, and return a tuple containing \var{pid}, and its exit status shifted left by 8 bits (shifting makes cross-platform use of the function easier). @@ -1194,7 +1196,7 @@ The value of integer \var{options} has no effect. \var{pid} can refer to any process whose id is known, not necessarily a child process. The \function{spawn()} functions called with \constant{P_NOWAIT} -return suitable process ids. +return suitable process handles. \end{funcdesc} \begin{datadesc}{WNOHANG}