121 Commits

Author SHA1 Message Date
Victor Stinner
e5bdad2201 bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2006)
On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the
pipe.
(cherry picked from commit d52aa31378)
2017-06-08 18:34:30 +02:00
Gregory P. Smith
f0739cbfe7 Issue #29335: Fix subprocess.Popen.wait() when the child process has
exited to a stopped instead of terminated state (ex: when under ptrace).
2017-01-22 22:38:28 -08:00
Serhiy Storchaka
994f04dbf5 Issue #28998: More APIs now support longs as well as ints. 2016-12-27 15:09:36 +02:00
Martin Panter
5e5af961b8 Issue #26240: Clean up the subprocess module doc string
Patch by Tim Mitchell.
2016-10-26 00:44:31 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)
253c0bff9a issue26083: Avoid duplicate error message string from a subprocess exec failure.Avoid a duplicate error message string from a subprocess exec failure.
:P
2016-05-28 19:24:14 +00:00
Martin Panter
1edccfa60a Issue #22274: Redirect stderr=STDOUT when stdout not redirected, by Akira Li 2016-05-13 01:54:44 +00:00
Gregory P. Smith
0d207fd8cf Fixes issue #26083: Workaround a subprocess bug that raised an incorrect
"ValueError: insecure string pickle" exception instead of the actual exception
on some platforms such as Mac OS X when an exception raised in the forked child
process prior to the exec() was large enough that it overflowed the internal
errpipe_read pipe buffer.
2016-01-11 13:56:42 -08:00
Gregory P. Smith
64fa45af5a Fixes issue #20954: _args_from_interpreter_flags used by multiprocessing
and some tests no longer behaves incorrectly in the presence of the
PYTHONHASHSEED environment variable.
2015-12-13 13:57:50 -08:00
Victor Stinner
c382807559 Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.
2014-07-29 00:04:54 +02:00
Benjamin Peterson
944996ff20 remove unnecessary word (closes #19060)
Patch by Anastasia Filatova.
2014-03-12 21:41:35 -05:00
Serhiy Storchaka
306158541c issue12085: Use more Pythonic way to check _child_created.
_active shouldn't be cached, it set to None on shutdown.
2014-02-10 19:19:53 +02:00
Antoine Pitrou
33fc744ea3 Issue #18851: Avoid a double close of subprocess pipes when the child process fails starting. 2013-08-30 23:38:13 +02:00
Charles-François Natali
4c53314475 Issue #18763: subprocess: The file descriptors are now closed after calling the
preexec_fn callback, which may open file descriptors.
2013-08-25 18:22:49 +02:00
Ezio Melotti
f5469cff1f #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:43:51 +03:00
Ned Deily
c94f07de77 Issue #18186: remove obsolete 2.2 compatibility comment. 2013-06-11 15:00:21 -07:00
Kristján Valur Jónsson
8927e8f421 Issue #12098: multiprocessing on Windows now starts child processes
using the same sys.flags as the current process.
Backport from default branch.
2013-03-19 15:07:35 -07:00
Andrew Svetlov
332562f447 Keep ref to ECHILD in local scope (#16650) 2012-12-24 20:09:27 +02:00
Gregory P. Smith
211248b214 Fix issue #16140 bug that the fix to issue #16327 added - don't double
close subprocess.PIPE file descriptors when the child encounters an
error prior to exec.
2012-11-11 02:00:49 -08:00
Gregory P. Smith
9d3b6e9822 Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:49:03 -08:00
Gregory P. Smith
f2705aebb0 Fixes issue #14396: Handle the odd rare case of waitpid returning 0
when not expected in subprocess.Popen.wait().
2012-11-10 21:13:20 -08:00
Gregory P. Smith
0798cbc1df Issue #15756: subprocess.poll() now properly handles errno.ECHILD to
return a returncode of 0 when the child has already exited or cannot
be waited on.
2012-09-29 12:02:48 -07:00
Antoine Pitrou
f60845b70a Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited. 2012-03-11 19:29:12 +01:00
Charles-François Natali
2a34eb3104 Issue #12786: Set communication pipes used by subprocess.Popen CLOEXEC to avoid
them being inherited by other subprocesses.
2011-08-25 21:20:54 +02:00
Charles-François Natali
b02302c5cf Issue #12650: Fix a race condition where a subprocess.Popen could leak
resources (FD/zombie) when killed at the wrong time.
2011-08-18 17:18:28 +02:00
Ross Lagerwall
d8e3901478 Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten.
2011-07-27 18:54:53 +02:00