summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* remove unnecessary word (closes #19060)Benjamin Peterson2014-03-131-1/+1
| | | | Patch by Anastasia Filatova.
* Issue #19612: On Windows, subprocess.Popen.communicate() now ignoresVictor Stinner2014-02-181-1/+9
| | | | | OSError(22, 'Invalid argument') when writing input data into stdin, whereas the process already exited.
* issue12085: Use more Pythonic way to check _child_created.Serhiy Storchaka2014-02-101-7/+6
| | | | _active shouldn't be cached, it set to None on shutdown.
* Fixes issue #19929: Call os.read with 32768 within subprocess.PopenGregory P. Smith2013-12-081-1/+1
| | | | | communicate rather than 4096 for efficiency. A microbenchmark shows Linux and OS X both using ~50% less cpu time this way.
* Fixes issue #19506: Use a memoryview to avoid a data copy when piping dataGregory P. Smith2013-12-081-2/+5
| | | | to stdin within subprocess.Popen.communicate. 5-10% less cpu usage.
* Undo supposed fix for Issue #15798 until I understand why this isGregory P. Smith2013-12-011-4/+1
| | | | | causing test_multiprocessing_forkserver and test_multiprocessing_spawn failures on head (3.4).
* Fixes Issue #15798 - subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-011-1/+4
| | | | descriptor 0, 1 or 2 is closed.
* Remove outdated commentTim Golden2013-11-111-1/+0
|
* Issue #10197 Rework subprocess.get[status]output to use subprocess ↵Tim Golden2013-11-031-15/+9
| | | | functionality and thus to work on Windows. Patch by Nick Coghlan.
* #18705: fix a number of typos. Patch by Févry Thibault.Ezio Melotti2013-08-171-1/+1
|
* Cleanup of documentation change from #17860Ronald Oussoren2013-07-071-0/+3
| | | | Reformulated the textual change, and applied it to the docstring as well.
* Prevent a possible double close of parent pipe fds when the subprocessGregory P. Smith2013-06-161-18/+25
| | | | | exec runs into an error. Prevent a regular multi-close of the /dev/null fd when any of stdin, stdout and stderr was set to DEVNULL.
* Fixes issue #17488: Change the subprocess.Popen bufsize parameter default valueGregory P. Smith2013-03-231-9/+9
|\ | | | | | | | | | | from unbuffered (0) to buffering (-1) to match the behavior existing code expects and match the behavior of the subprocess module in Python 2 to avoid introducing hard to track down bugs.
| * Fixes issue #17488: Change the subprocess.Popen bufsize parameter default valueGregory P. Smith2013-03-231-9/+9
| | | | | | | | | | | | from unbuffered (0) to buffering (-1) to match the behavior existing code expects and match the behavior of the subprocess module in Python 2 to avoid introducing hard to track down bugs.
* | mergeGregory P. Smith2013-03-211-4/+3
|\ \ | |/
| * remove the long obsolete mention of universal newlines mode only beingGregory P. Smith2013-03-211-4/+3
| | | | | | | | available when configured at compile time.
| * Issue #16903: Popen.communicate() on Unix now accepts strings whenSerhiy Storchaka2013-02-041-0/+4
| | | | | | | | universal_newlines is true as on Windows.
* | Use a larger amount of data for tests such as the interrupted_writeGregory P. Smith2013-03-201-2/+5
| | | | | | | | | | tests that depend on filling up an OS pipe so that they work properly on systems configured with large pipe buffers.
* | Keep ref to ECHILD in local scope (#16650)Andrew Svetlov2012-12-241-2/+2
|\ \ | |/
| * Keep ref to ECHILD in local scope (#16650)Andrew Svetlov2012-12-241-2/+2
| |
* | Fixes issue #16140: The subprocess module no longer double closes itsGregory P. Smith2012-11-111-3/+0
|\ \ | |/ | | | | | | | | | | | | | | child subprocess.PIPE parent file descriptors on child error prior to exec(). This would lead to race conditions in multithreaded programs where another thread opened a file reusing the fd which was then closed out from beneath it by the errant second close.
| * Fixes issue #16140: The subprocess module no longer double closes itsGregory P. Smith2012-11-111-3/+0
| | | | | | | | | | | | | | | | | | child subprocess.PIPE parent file descriptors on child error prior to exec(). This would lead to race conditions in multithreaded programs where another thread opened a file reusing the fd which was then closed out from beneath it by the errant second close.
* | Remove the subprocess "bad exception data" warning (formerly a print!)Gregory P. Smith2012-11-111-3/+2
|\ \ | |/ | | | | | | | | | | | | all together and just include the repr of the data in the exception itself instead of the useless string "Unknown". This code path is unlikely to even be possible to take given the nature of the pipe it gets subprocess data from.
| * Remove the subprocess "bad exception data" warning (formerly a print!)Gregory P. Smith2012-11-111-3/+2
| | | | | | | | | | | | | | | | all together and just include the repr of the data in the exception itself instead of the useless string "Unknown". This code path is unlikely to even be possible to take given the nature of the pipe it gets subprocess data from.
* | Rename a local variable for readability and change a "this can'tGregory P. Smith2012-11-111-6/+8
|\ \ | |/ | | | | | | happen" print() call into a RuntimeWarning as it should've been in the first place. Because nothing should ever cause unexpected stdout output.
| * Rename a local variable for readability and change a "this can'tGregory P. Smith2012-11-111-6/+8
| | | | | | | | | | happen" print() call into a RuntimeWarning as it should've been in the first place. Because nothing should ever cause unexpected stdout output.
* | Fixes issue #16327: The subprocess module no longer leaks file descriptorsGregory P. Smith2012-11-111-3/+17
|\ \ | |/ | | | | used for stdin/stdout/stderr pipes to the child when fork() fails.
| * Fixes issue #16327: The subprocess module no longer leaks file descriptorsGregory P. Smith2012-11-111-3/+17
| | | | | | | | used for stdin/stdout/stderr pipes to the child when fork() fails.
* | Fixes issue #14396: Handle the odd rare case of waitpid returning 0Gregory P. Smith2012-11-111-3/+7
|\ \ | |/ | | | | when not expected in subprocess.Popen.wait().
| * Fixes issue #14396: Handle the odd rare case of waitpid returning 0 whenGregory P. Smith2012-11-111-2/+6
| | | | | | | | not expected in subprocess.Popen.wait().
* | Fixes Issue #16114: The subprocess module no longer provides aGregory P. Smith2012-10-101-1/+9
|\ \ | |/ | | | | | | | | misleading error message stating that args[0] did not exist when either the cwd or executable keyword arguments specified a path that did not exist.
| * Fixes Issue #16114: The subprocess module no longer provides aGregory P. Smith2012-10-101-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | misleading error message stating that args[0] did not exist when either the cwd or executable keyword arguments specified a path that did not exist. It now keeps track of if the child got as far as preexec and reports it if not back to the parent via a special "noexec" error message value in the error pipe so that the cwd can be blamed for a failed chdir instead of the exec of the executable being blamed instead. The executable is also always reported accurately when exec fails. Unittests enhanced to cover these cases.
* | Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILDGregory P. Smith2012-09-291-1/+8
|\ \ | |/ | | | | | | to return a returncode of 0 when the child has already exited or cannot be waited on.
| * Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILDGregory P. Smith2012-09-291-1/+8
| | | | | | | | | | to return a returncode of 0 when the child has already exited or cannot be waited on.
* | Issue #15595: Fix subprocess.Popen(universal_newlines=True)Andrew Svetlov2012-08-191-2/+2
|\ \ | |/ | | | | | | | | for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
| * Issue #15595: Fix subprocess.Popen(universal_newlines=True)Andrew Svetlov2012-08-191-2/+2
| | | | | | | | | | | | for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
* | Use Thread.is_alive() instead of old-style Thread.isAlive() in subprocess.Andrew Svetlov2012-08-191-2/+2
| |
* | Cleanup universal_newlines usage for subprocess.Popen, remove unused param.Andrew Svetlov2012-08-151-4/+4
| |
* | Issue #15592. Fix regression: subprocess.communicate() breaks on no input ↵Andrew Svetlov2012-08-141-12/+13
|\ \ | |/ | | | | | | | | with universal newlines true. Patch by Chris Jerdonek.
* | Close #14690: Use monotonic clock instead of system clock in the sched,Victor Stinner2012-05-301-4/+8
| | | | | | | | subprocess and trace modules.
* | Implemented PEP 405 (Python virtual environments).Vinay Sajip2012-05-261-1/+1
| |
* | Move private function _args_from_interpreter_flags() to subprocess.py, soAntoine Pitrou2012-05-181-0/+31
| | | | | | | | | | that it can be imported when threads are disabled. (followup to issue #12098)
* | Issue #11750: The Windows API functions scattered in the _subprocess andAntoine Pitrou2012-04-181-37/+69
| | | | | | | | | | _multiprocessing.win32 modules now live in a single module "_winapi". Patch by sbt.
* | Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under ↵Antoine Pitrou2012-03-111-1/+9
|\ \ | |/ | | | | Windows when the child process has already exited.
| * Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under ↵Antoine Pitrou2012-03-111-1/+11
| | | | | | | | Windows when the child process has already exited.
* | Use InterruptedError instead of checking for EINTRAntoine Pitrou2011-10-231-4/+2
| |
* | Issue #12494: Close pipes and kill process on error in subprocess functionsVictor Stinner2011-09-011-22/+34
| | | | | | | | | | | | On error, call(), check_call(), check_output() and getstatusoutput() functions of the subprocess module now kill the process, read its status (to avoid zombis) and close pipes.
* | Issue #12650: Fix a race condition where a subprocess.Popen could leakCharles-François Natali2011-08-181-1/+6
|\ \ | |/ | | | | resources (FD/zombie) when killed at the wrong time.
| * Issue #12650: Fix a race condition where a subprocess.Popen could leakCharles-François Natali2011-08-181-1/+6
| | | | | | | | resources (FD/zombie) when killed at the wrong time.
| * Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr isRoss Lagerwall2011-07-271-0/+8
| | | | | | | | given as a low fd, it gets overwritten.