summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
|
* 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
| |\
| | * Keep ref to ECHILD in local scope (#16650)Andrew Svetlov2012-12-241-2/+2
| | |
* | | Fix #14470. Remove w9xpopen per PEP 11.Brian Curtin2012-12-231-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | As stated in PEP 11, 3.4 removes code on Windows platforms where COMSPEC points to command.com. The w9xpopen project in Visual Studio was added to support that case, and there was a special case in subprocess to cover that situation. This change removes the w9xpopen project from the Visual Studio solution and removes any references to the w9xpopen executable.
* | | Issue #16706: get rid of os.errorAndrew Svetlov2012-12-181-2/+2
| | |
* | | Get rig of EnvironmentError (#16705)Andrew Svetlov2012-12-171-2/+2
| | |
* | | Issue #16704: Get rid of select.error in stdlib. Use OSError instead.Andrew Svetlov2012-12-171-2/+2
| | |
* | | Remove obsolete code: now IOError and WindowsError are aliases for OSErrorAndrew Svetlov2012-12-171-8/+0
| | |
* | | 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.
| | * 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.
| | * 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.
* | | Raise our own SubprocessError rather than a RuntimeError in when dealing withGregory P. Smith2012-11-111-6/+6
|/ / | | | | | | odd rare errors coming from the subprocess module.
* | 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.
* | Issue #12591: Improve support of "universal newlines" in the subprocessAntoine Pitrou2011-07-231-1/+1
|\ \ | |/ | | | | module: the piped streams can now be properly read from or written to.
| * Issue #12591: Improve support of "universal newlines" in the subprocessAntoine Pitrou2011-07-231-1/+1
| | | | | | | | | | | | | | module: the piped streams can now be properly read from or written to. (this was broken due to the 2.x to 3.x transition; communicate() support is still sketchy)
* | (merge 3.2) Issue #12493: subprocess: communicate() handles EINTRVictor Stinner2011-07-051-3/+3
|\ \ | |/ | | | | | | subprocess.Popen.communicate() now also handles EINTR errors if the process has only one pipe.
| * Issue #12493: subprocess: communicate() handles EINTRVictor Stinner2011-07-051-3/+3
| | | | | | | | | | subprocess.Popen.communicate() now also handles EINTR errors if the process has only one pipe.
* | (merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy theVictor Stinner2011-06-211-1/+1
|\ \ | |/ | | | | environment variables, start with an empty environment.
| * Close #12383: Fix subprocess module with env={}: don't copy the environmentVictor Stinner2011-06-211-1/+1
| | | | | | | | variables, start with an empty environment.
* | (Merge 3.2) Close #12085: Fix an attribute error in subprocess.Popen destructorVictor Stinner2011-05-311-1/+4
|\ \ | |/ | | | | | | if the constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan.
| * Close #12085: Fix an attribute error in subprocess.Popen destructor if theVictor Stinner2011-05-311-1/+4
| | | | | | | | | | constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan.