Document clearly that the only way to retrieve the return code from the
child processes is to use the Popen3 and Popen4 classes. This fixes SF bug #460512.
This commit is contained in:
parent
7b07a41e9f
commit
098d7fae39
|
@ -315,6 +315,12 @@ specified, it specifies the buffer size for the I/O pipes.
|
||||||
objects should be opened in binary or text mode. The default value
|
objects should be opened in binary or text mode. The default value
|
||||||
for \var{mode} is \code{'t'}.
|
for \var{mode} is \code{'t'}.
|
||||||
|
|
||||||
|
These methods do not make it possible to retrieve the return code from
|
||||||
|
the child processes. The only way to control the input and output
|
||||||
|
streams and also retrieve the return codes is to use the
|
||||||
|
\class{Popen3} and \class{Popen4} classes from the \refmodule{popen2}
|
||||||
|
module; these are only available on \UNIX.
|
||||||
|
|
||||||
\begin{funcdesc}{popen2}{cmd\optional{, mode\optional{, bufsize}}}
|
\begin{funcdesc}{popen2}{cmd\optional{, mode\optional{, bufsize}}}
|
||||||
Executes \var{cmd} as a sub-process. Returns the file objects
|
Executes \var{cmd} as a sub-process. Returns the file objects
|
||||||
\code{(\var{child_stdin}, \var{child_stdout})}.
|
\code{(\var{child_stdin}, \var{child_stdout})}.
|
||||||
|
|
|
@ -24,6 +24,13 @@ this is needed to determine whether the file objects should be opened
|
||||||
in binary or text mode. The default value for \var{mode} is
|
in binary or text mode. The default value for \var{mode} is
|
||||||
\code{'t'}.
|
\code{'t'}.
|
||||||
|
|
||||||
|
The only way to retrieve the return codes for the child processes is
|
||||||
|
by using the \method{poll()} or \method{wait()} methods on the
|
||||||
|
\class{Popen3} and \class{Popen4} classes; these are only available on
|
||||||
|
\UNIX. This information is not available when using the
|
||||||
|
\function{popen2()}, \function{popen3()}, and \function{popen4()}
|
||||||
|
functions, or the equivalent functions in the \refmodule{os} module.
|
||||||
|
|
||||||
\begin{funcdesc}{popen2}{cmd\optional{, bufsize\optional{, mode}}}
|
\begin{funcdesc}{popen2}{cmd\optional{, bufsize\optional{, mode}}}
|
||||||
Executes \var{cmd} as a sub-process. Returns the file objects
|
Executes \var{cmd} as a sub-process. Returns the file objects
|
||||||
\code{(\var{child_stdout}, \var{child_stdin})}.
|
\code{(\var{child_stdout}, \var{child_stdin})}.
|
||||||
|
|
Loading…
Reference in New Issue