File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,6 +315,12 @@ \subsection{File Object Creation \label{os-newstreams}}
315315objects should be opened in binary or text mode. The default value
316316for \var {mode} is \code {'t'}.
317317
318+ These methods do not make it possible to retrieve the return code from
319+ the child processes. The only way to control the input and output
320+ streams and also retrieve the return codes is to use the
321+ \class {Popen3} and \class {Popen4} classes from the \refmodule {popen2}
322+ module; these are only available on \UNIX .
323+
318324\begin {funcdesc }{popen2}{cmd\optional {, mode\optional {, bufsize}}}
319325Executes \var {cmd} as a sub-process. Returns the file objects
320326\code {(\var {child_stdin}, \var {child_stdout})}.
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ \section{\module{popen2} ---
2424in binary or text mode. The default value for \var {mode} is
2525\code {'t'}.
2626
27+ The only way to retrieve the return codes for the child processes is
28+ by using the \method {poll()} or \method {wait()} methods on the
29+ \class {Popen3} and \class {Popen4} classes; these are only available on
30+ \UNIX . This information is not available when using the
31+ \function {popen2()}, \function {popen3()}, and \function {popen4()}
32+ functions, or the equivalent functions in the \refmodule {os} module.
33+
2734\begin {funcdesc }{popen2}{cmd\optional {, bufsize\optional {, mode}}}
2835Executes \var {cmd} as a sub-process. Returns the file objects
2936\code {(\var {child_stdout}, \var {child_stdin})}.
You can’t perform that action at this time.
0 commit comments