summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* #2304: fix incorporating Eric Smith's .format suggestion and tested on ↵Tim Golden2010-08-121-2/+2
| | | | Ubuntu as well as Windows
* revert 83832; unix test breakageBenjamin Peterson2010-08-081-1/+1
|
* Issue #2304: Add additional quotes when using cmd shell on Windows. Original ↵Tim Golden2010-08-081-1/+1
| | | | patch from Gabriel Genellina
* Issue #3210: Revert C module changes and apply patch from Hirokazu Yamamoto ↵Tim Golden2010-08-081-14/+13
| | | | instead
* Issue #9265: Incorrect name passed as arg[0] when shell=TrueStefan Krah2010-07-191-0/+2
| | | | and executable specified.
* Revert r60115Jean-Paul Calderone2010-06-181-3/+3
| | | | | | | | | | | | This revision introduced quoting for strings containing | based on a misunderstanding of the commonly used quoting rules used on Windows. | is interpreted by cmd.exe, not by the MS C runtime argv initializer. It only needs to be quoted if it is part of an argument passed through cmd.exe. See issue1300, issue7839, and issue8972.
* Fix regression introduced by r81154 (Issue #5099, subprocess destructor)Victor Stinner2010-05-141-3/+3
|
* subprocess.Popen.__del__ referenced global objects, which is a no-no thanks toBrett Cannon2010-05-141-17/+34
| | | | | | | | | | | | | | | | interpreter shutdown semantics. Same issue goes for the methods that __del__ called. Now all the methods capture the global objects it needs as default values to private parameters (could have stuck them on the class object itself, but since the objects have nothing directly to do with the class that seemed wrong). There is no test as making one that works is hard. This patch was verified against a consistently failing test in Mercurial's test suite, though, so it has been tested in some regard. Closes issue #5099. Thanks to Mary Stern for the bug report and Gabriel Genellina for writing another patch for the same issue and attempting to write a test.
* Revert an accidental commit from r80492.Brett Cannon2010-04-251-36/+17
|
* When DeprecationWarning was silenced by default, it also silenced any use of -QBrett Cannon2010-04-251-17/+36
| | | | | | | by default as well. This change fixes that by treating -Q like -3 when it comes to DeprecationWarning; using it causes the silencing to not occur. Fixes issue #7319.
* Fix #7838. Add docstrings and privatize _subprocess implementation details.Brian Curtin2010-04-241-47/+39
| | | | | | Since CREATE_NEW_* are used for the creation flags of a subprocess, they were added to __all__. The rest of the previously exposed attributes are now qualified by _subprocess.ATTR rather than importing *.
* Implement #1220212. Add os.kill support for Windows.Brian Curtin2010-04-021-0/+4
| | | | | | | | | | | | | | os.kill takes one of two newly added signals, CTRL_C_EVENT and CTRL_BREAK_EVENT, or any integer value. The events are a special case which work with subprocess console applications which implement a special console control handler. Any other value but those two will cause os.kill to use TerminateProcess, outright killing the process. This change adds win_console_handler.py, which is a script to implement SetConsoleCtrlHandler and applicable handler function, using ctypes. subprocess also gets another attribute which is a necessary flag to creationflags in Popen in order to send the CTRL events.
* Fix syntax: "rc != None" -> "rc is not None"Florent Xicluna2010-03-081-1/+1
|
* Issue #1068268: The subprocess module now handles EINTR in internalGregory P. Smith2010-03-011-3/+14
| | | | os.waitpid and os.read system calls where appropriate.
* No need to assign the results of expressions used only for side effects.Georg Brandl2010-02-061-1/+1
|
* #7381: consistency update, and backport avoiding ``None >= 0`` check from py3k.Georg Brandl2009-12-281-4/+6
|
* #7381: subprocess documentation and library docstring consistency fixes.Georg Brandl2009-12-201-9/+9
|
* Issue 7294: Fixed URL in a comment.Eric Smith2009-11-091-1/+3
|
* #5329: fix os.popen* regression from 2.5: don't execute commands as a sequencePhilip Jenvey2009-09-291-15/+41
| | | | | | through the shell. also document the correct subprocess replacement for this case patch from Jean-Paul Calderone and Jani Hakala
* Revert r74028.Georg Brandl2009-07-161-2/+2
|
* #6482: simplify "except: raise" to "finally:".Georg Brandl2009-07-161-2/+2
|
* #6447: typo in subprocess docstringAmaury Forgeot d'Arc2009-07-101-2/+2
|
* #6416: Fix compilation of the select module on Windows, as well as ↵Amaury Forgeot d'Arc2009-07-091-5/+6
| | | | | | | | test_subprocess: PIPE_BUF is not defined on Windows, and probably has no meaning there. Anyway the subprocess module uses another way to perform non-blocking reads (with a thread)
* Use select.poll() in subprocess, when available, rather than select() so thatGregory P. Smith2009-07-041-35/+96
| | | | | | | | | | it does not fail when file descriptors are large. Fixes issue3392. Patch largely contributed by Frank Chu (fpmc) with some improvements by me. See http://bugs.python.org/issue3392. Candidate for backporting to release26-maint as it is a bug fix and changes no public API.
* Issue #6274. Fixed a potential FD leak in subprocess.py.Facundo Batista2009-06-191-82/+90
|
* #6189: The subprocess.py module should be kept compatible with python 2.2Amaury Forgeot d'Arc2009-06-181-3/+12
| | | | | (On windows, you still have to change one line to use pywin32 instead of the _subprocess helper module)
* Issue #5179: Fixed subprocess handle leak on failure on windows.Hirokazu Yamamoto2009-03-031-32/+15
|
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-2/+2
|
* #5179: don't leak PIPE fds when child execution fails.Georg Brandl2009-02-141-0/+3
|
* rename the new check_call_output to check_output. its less ugly.Gregory P. Smith2008-12-051-11/+11
|
* Adds a subprocess.check_call_output() function to return the output from aGregory P. Smith2008-12-041-12/+60
| | | | process on success or raise an exception on error.
* Remove warnings generated for the suprocess module when run under -3. RequiredBrett Cannon2008-08-081-7/+8
| | | | | | commenting out True/False compatbility stuff, remove a use of apply(), and remove a use of buffer() (just pulled the solution used in 3.0 which is direct slicing).
* - Issue #1857: subprocess.Popen.poll gained an additional _deadstate keywordGregory P. Smith2008-08-041-4/+8
| | | | | argument in python 2.5, this broke code that subclassed Popen to include its own poll method. Fixed my moving _deadstate to an _internal_poll method.
* - Issue #2113: Fix error in subprocess.Popen if the select system call isGregory P. Smith2008-07-061-1/+6
| | | | interrupted by a signal.
* Fixes issue2791: subprocess.Popen.communicate leaked a file descripton untilGregory P. Smith2008-05-261-0/+2
| | | | | | | the last reference to the Popen instance was dropped. Adding explicit close() calls fixes it. Candidate for backport to release25-maint.
* Added kill, terminate and send_signal to subprocess.PopenChristian Heimes2008-04-191-0/+32
| | | | The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
* Fix issue 1300: Quote command line arguments that contain a '|' character inGregory P. Smith2008-01-191-3/+3
| | | | subprocess.list2cmdline (windows).
* Undo an unnecessary else: and indentation that r60104 added.Gregory P. Smith2008-01-191-58/+57
| | | | | | | | | | | | try: ... except: ... raise else: ... the else: is unecessary due to the blind except: with a raise.
* Fixes issue1336 - a race condition could occur when forking if the gcGregory P. Smith2008-01-191-58/+71
| | | | | | | kicked in during the critical section. solution: disable gc during that section. Patch contributed by jpa and updated by me to cover the race condition still existing what therve from twistedmatrix pointed out (already seen and fixed in twisted's own subprocess code).
* fix comment typos, use not arg instead of arg == "", add test coverageGregory P. Smith2008-01-191-3/+3
| | | | for inside of the final if needquotes: within subprocess.list2cmdline().
* #1663329: add os.closerange() to close a range of fds,Georg Brandl2008-01-191-7/+2
| | | | | ignoring errors, and use this in subprocess to speed up subprocess creation in close_fds mode. Patch by Mike Klaas.
* Applied patch 1669481, slightly modified: Support close_fds on Win32Peter Astrand2007-05-261-5/+4
|
* Remove trailing whitespace in docstringNeal Norwitz2007-05-111-2/+0
|
* Fix typo in docstring (the module is popen2, not 3).Neal Norwitz2007-05-111-1/+1
|
* Bug #1704790: bind name "sys" locally in __del__ method so that it isGeorg Brandl2007-04-211-1/+1
| | | | not cleared before __del__ is run.
* Whitespace normalization.Tim Peters2007-03-121-1/+1
|
* Applied patch 1124861.3.patch to solve bug #1124861: Automatically create ↵Peter Astrand2007-02-061-3/+25
| | | | pipes on Windows, if GetStdHandle fails. Will backport.
* We had several if statements checking the value of a fd. This is unsafe, ↵Peter Astrand2007-02-021-15/+15
| | | | since valid fds might be zero. We should check for not None instead.
* Whitespace normalization.Tim Peters2007-01-301-1/+1
|
* Fix for bug #1634343: allow specifying empty arguments on WindowsPeter Astrand2007-01-131-1/+1
|