summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* 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. (this was broken due to the 2.x to 3.x transition; communicate() support is still sketchy)
* 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.
* Close #12383: Fix subprocess module with env={}: don't copy the environmentVictor Stinner2011-06-211-1/+1
| | | | variables, start with an empty environment.
* 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.
* normalize whitespace.Gregory P. Smith2011-05-121-1/+1
|
* merge - 7a3f3ad83676 Fixes Issue #12044.Gregory P. Smith2011-05-121-0/+2
|
* mergeBrian Curtin2011-04-291-2/+9
|\
| * Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of theBrian Curtin2011-04-291-2/+9
| | | | | | | | constants to be used for STARTUPINFO were exposed due to the change.
* | Merge with 3.1Ross Lagerwall2011-04-051-11/+34
|\ \ | |/
| * Issue #10963: Ensure that subprocess.communicate() never raises EPIPE.Ross Lagerwall2011-04-051-11/+34
| |
* | Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really createsAntoine Pitrou2011-03-191-2/+0
|\ \ | |/ | | | | unbuffered pipes, such that select() works properly on them.
| * Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really createsAntoine Pitrou2011-03-191-2/+0
| | | | | | | | unbuffered pipes, such that select() works properly on them.
* | #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\ \ | |/
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
| * Merged revisions 87695 via svnmerge fromAntoine Pitrou2011-01-031-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines Issue #10806, issue #9905: Fix subprocess pipes when some of the standard file descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross Lagerwall. ........
| * Merged revisions 87233 via svnmerge fromGregory P. Smith2010-12-141-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87233 | gregory.p.smith | 2010-12-14 06:38:00 -0800 (Tue, 14 Dec 2010) | 4 lines Issue #1731717: Fixed the problem where subprocess.wait() could cause an OSError exception when The OS had been told to ignore SIGCLD in our process or otherwise not wait for exiting child processes. ........
| * Merged revisions 76923,76926,77009,77082-77083,77085,77087,77121 via ↵Georg Brandl2010-10-061-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r76923 | georg.brandl | 2009-12-20 15:24:06 +0100 (So, 20 Dez 2009) | 1 line #7493: more review fixes. ................ r76926 | georg.brandl | 2009-12-20 15:38:23 +0100 (So, 20 Dez 2009) | 9 lines Recorded merge of revisions 76925 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76925 | georg.brandl | 2009-12-20 15:33:20 +0100 (So, 20 Dez 2009) | 1 line #7381: subprocess documentation and library docstring consistency fixes. ........ ................ r77009 | georg.brandl | 2009-12-23 11:30:45 +0100 (Mi, 23 Dez 2009) | 1 line #7417: add signature to open() docstring. ................ r77082 | georg.brandl | 2009-12-28 08:59:20 +0100 (Mo, 28 Dez 2009) | 1 line #7577: fix signature info for getbufferproc. ................ r77083 | georg.brandl | 2009-12-28 09:00:47 +0100 (Mo, 28 Dez 2009) | 9 lines Merged revisions 77081 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77081 | georg.brandl | 2009-12-28 08:59:05 +0100 (Mo, 28 Dez 2009) | 1 line #7577: fix signature of PyBuffer_FillInfo(). ........ ................ r77085 | georg.brandl | 2009-12-28 09:02:38 +0100 (Mo, 28 Dez 2009) | 9 lines Merged revisions 77084 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77084 | georg.brandl | 2009-12-28 09:01:59 +0100 (Mo, 28 Dez 2009) | 1 line #7586: fix typo. ........ ................ r77087 | georg.brandl | 2009-12-28 09:10:38 +0100 (Mo, 28 Dez 2009) | 9 lines Recorded merge of revisions 77086 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77086 | georg.brandl | 2009-12-28 09:09:32 +0100 (Mo, 28 Dez 2009) | 1 line #7381: consistency update, and backport avoiding ``None >= 0`` check from py3k. ........ ................ r77121 | georg.brandl | 2009-12-29 22:38:35 +0100 (Di, 29 Dez 2009) | 1 line #7590: exception classes no longer are in the "exceptions" module. Also clean up text that was written with string exceptions in mind. ................
| * #2304: fix incorporating Eric Smith's .format suggestion and tested on ↵Tim Golden2010-08-121-1/+1
| | | | | | | | Ubuntu as well as Windows
| * revert r83831, 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
| * Merged revisions 82971 via svnmerge fromStefan Krah2010-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82971 | stefan.krah | 2010-07-19 16:20:53 +0200 (Mon, 19 Jul 2010) | 4 lines Issue #9265: Incorrect name passed as arg[0] when shell=True and executable specified. ........
| * Merged revisions 82076 via svnmerge fromJean-Paul Calderone2010-06-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82076 | jean-paul.calderone | 2010-06-18 16:03:54 -0400 (Fri, 18 Jun 2010) | 19 lines Merged revisions 82075 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82075 | jean-paul.calderone | 2010-06-18 16:00:17 -0400 (Fri, 18 Jun 2010) | 12 lines Revert r60115 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. ........ ................
| * Merged revisions 81181 via svnmerge fromVictor Stinner2010-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81181 | victor.stinner | 2010-05-14 23:53:45 +0200 (ven., 14 mai 2010) | 9 lines Merged revisions 81179 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81179 | victor.stinner | 2010-05-14 23:52:26 +0200 (ven., 14 mai 2010) | 2 lines Fix regression introduced by r81154 (Issue #5099, subprocess destructor) ........ ................
| * Backport r81155.Brett Cannon2010-05-141-16/+33
| |
| * Merged revisions 80441 via svnmerge fromBrian Curtin2010-04-241-47/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80441 | brian.curtin | 2010-04-24 11:19:22 -0500 (Sat, 24 Apr 2010) | 13 lines Merged revisions 80439 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80439 | brian.curtin | 2010-04-24 10:40:11 -0500 (Sat, 24 Apr 2010) | 6 lines Fix #7838. Add docstrings and privatize _subprocess implementation details. 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 *. ........ ................
| * Merged revisions 78524 via svnmerge fromGregory P. Smith2010-03-011-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78524 | gregory.p.smith | 2010-02-28 16:17:40 -0800 (Sun, 28 Feb 2010) | 10 lines Merged revisions 78523 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78523 | gregory.p.smith | 2010-02-28 16:05:08 -0800 (Sun, 28 Feb 2010) | 3 lines Issue #1068268: The subprocess module now handles EINTR in internal os.waitpid and os.read system calls where appropriate. ........ ................
| * Merged revisions 76170 via svnmerge fromEric Smith2009-11-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76170 | eric.smith | 2009-11-09 10:23:15 -0500 (Mon, 09 Nov 2009) | 9 lines Merged revisions 76168 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76168 | eric.smith | 2009-11-09 10:16:23 -0500 (Mon, 09 Nov 2009) | 1 line Issue 7294: Fixed URL in a comment. ........ ................
| * Merged revisions 73917 via svnmerge fromGregory P. Smith2009-08-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k (the changes that add a select.PIPE_BUF attribute were removed) This merge fixes issue3392 ................ r73917 | amaury.forgeotdarc | 2009-07-09 15:44:11 -0700 (Thu, 09 Jul 2009) | 12 lines Merged revisions 73916 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73916 | amaury.forgeotdarc | 2009-07-10 00:37:22 +0200 (ven., 10 juil. 2009) | 5 lines #6416: Fix compilation of the select module on Windows, as well as 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) ........ ................
| * Recorded merge of revisions 74057 via svnmerge fromGeorg Brandl2009-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k (Only selected revisions.) ................ r74057 | alexandre.vassalotti | 2009-07-17 12:42:05 +0200 (Fr, 17 Jul 2009) | 54 lines Merged revisions 73930-73932,73937-73939,73945,73951,73954,73962-73963,73970 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73930 | amaury.forgeotdarc | 2009-07-10 12:47:42 -0400 (Fri, 10 Jul 2009) | 2 lines #6447: typo in subprocess docstring ........ r73937 | georg.brandl | 2009-07-11 06:12:36 -0400 (Sat, 11 Jul 2009) | 1 line Fix style. ........ r73938 | georg.brandl | 2009-07-11 06:14:54 -0400 (Sat, 11 Jul 2009) | 1 line #6446: fix import_spam() function to use correct error and reference handling. ........ r73939 | georg.brandl | 2009-07-11 06:18:10 -0400 (Sat, 11 Jul 2009) | 1 line #6448: clarify docs for find_module(). ........ r73945 | georg.brandl | 2009-07-11 06:51:31 -0400 (Sat, 11 Jul 2009) | 1 line #6456: clarify the meaning of constants used as arguments to nl_langinfo(). ........ r73951 | georg.brandl | 2009-07-11 10:23:38 -0400 (Sat, 11 Jul 2009) | 2 lines array.array is actually a class. ................
| * Merged revisions 73833,73838,73850-73852,73856-73857 via svnmerge fromGeorg Brandl2009-08-131-29/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ................ r73833 | gregory.p.smith | 2009-07-04 04:46:54 +0200 (Sa, 04 Jul 2009) | 20 lines Merged revisions 73825-73826 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73825 | gregory.p.smith | 2009-07-03 18:49:29 -0700 (Fri, 03 Jul 2009) | 9 lines Use select.poll() in subprocess, when available, rather than select() so that 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. ........ r73826 | gregory.p.smith | 2009-07-03 18:55:11 -0700 (Fri, 03 Jul 2009) | 2 lines news entry for r73825 ........ Candidate for backporting to release31-maint as it is a bug fix and changes no public API. ................ r73838 | gregory.p.smith | 2009-07-04 10:32:15 +0200 (Sa, 04 Jul 2009) | 2 lines change deprecated unittest method calls into their proper names. ................ r73850 | alexandre.vassalotti | 2009-07-05 07:38:18 +0200 (So, 05 Jul 2009) | 3 lines Issue 4509: Do not modify an array if we know the change would result in a failure due to exported buffers. ................ r73851 | alexandre.vassalotti | 2009-07-05 07:47:28 +0200 (So, 05 Jul 2009) | 2 lines Add more test cases to BaseTest.test_memoryview_no_resize. ................ r73852 | alexandre.vassalotti | 2009-07-05 08:25:14 +0200 (So, 05 Jul 2009) | 5 lines Fix array.extend and array.__iadd__ to handle the case where an array is extended with itself. This bug is specific the py3k version of arraymodule.c ................ r73856 | alexandre.vassalotti | 2009-07-05 08:42:44 +0200 (So, 05 Jul 2009) | 6 lines Issue 4005: Remove .sort() call on dict_keys object. This caused pydoc to fail when there was a zip file in sys.path. Patch contributed by Amaury Forgeot d'Arc. ................ r73857 | alexandre.vassalotti | 2009-07-05 08:50:08 +0200 (So, 05 Jul 2009) | 2 lines Add NEWS entries for the changes I made recently. ................
* | In subprocess, wrap pipe fds before launching the child. Hopefully thisAntoine Pitrou2011-01-041-7/+21
| | | | | | | | will fix intermittent failures on some buildbots (issue #8458).
* | Un-complicate some codeAntoine Pitrou2011-01-031-15/+5
| |
* | Issue #10806, issue #9905: Fix subprocess pipes when some of the standardAntoine Pitrou2011-01-031-25/+27
| | | | | | | | | | file descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross Lagerwall.
* | Issue #10763: subprocess.communicate() closes stdout and stderr if both areVictor Stinner2010-12-251-0/+1
| | | | | | | | | | | | pipes (bug specific to Windows). Improve also the unit test: write a portable unit test.
* | Issue #1731717: Fixed the problem where subprocess.wait() could cause anGregory P. Smith2010-12-141-2/+14
| | | | | | | | | | OSError exception when The OS had been told to ignore SIGCLD in our process or otherwise not wait for exiting child processes.
* | Issue #6559: fix the subprocess.Popen pass_fds implementation. Add a unittest.Gregory P. Smith2010-12-141-19/+28
| | | | | | | | | | | | | | | | Issue #7213: Change the close_fds default on Windows to better match the new default on POSIX. True when possible (False if stdin/stdout/stderr are supplied). Update the documentation to reflect all of the above.
* | issue7213: Open the pipes used by subprocesses with the FD_CLOEXEC flag fromGregory P. Smith2010-12-131-15/+21
| | | | | | | | | | the C code, using pipe2() when available. Adds unittests for close_fds and cloexec behaviors.
* | Get rid of the close_fds DeprecationWarning. Changes the default on a perGregory P. Smith2010-12-131-20/+19
| | | | | | | | | | | | platform basis. It remains False on Windows and changes to True on all other platforms (POSIX). Based on python-dev discussion and http://bugs.python.org/issue7213.
* | clarify the docs and new warning message.Gregory P. Smith2010-12-041-2/+2
| |
* | issue6559: Adds a pass_fds parameter to subprocess.Popen that allows the callerGregory P. Smith2010-12-041-6/+32
| | | | | | | | to list exactly which file descriptors should be kept open.
* | issue7213 + issue2320: Cause a DeprecationWarning if the close_fds argument isGregory P. Smith2010-12-041-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | not passed to subprocess.Popen as the default value will be changing in a future Python to the safer and more often desired value of True. DeprecationWarnings that show up in a lot of existing code are controversial and have caused pain in the past. I'd like to leave this on for 3.2 beta1 and see how things go. We can remove the warning if it is deemed too noisy during any betas. (case study: the md5 and sha module DeprecationWarnings are loathed around the world as those modules were never going to be removed in 2.x and 2to3 has a fixer for code that uses them)
* | Fix #10554. Added context manager support to Popen objects.Brian Curtin2010-12-031-0/+10
| | | | | | | | | | | | Added a few common Popen uses to the tests like we've done for a few other instances of adding context managers. Eventually the entire test suite could be converted to use the context manager format.
* | don't shadow globalsBenjamin Peterson2010-11-201-8/+8
| |
* | add filename to ENOENT message #4925Benjamin Peterson2010-11-201-0/+2
| |
* | Adjust #8956 to add the bad signal number to the exception message.Brian Curtin2010-09-071-1/+1
| |
* | Fix #8956. ValueError message was only mentioning one signal.Brian Curtin2010-09-061-1/+1
| | | | | | | | | | Rather than list out the three signals (or more over time), the message was made less specific but still descriptive.
* | #2304: fix incorporating Eric Smith's .format suggestion and tested on ↵Tim Golden2010-08-111-1/+1
| | | | | | | | Ubuntu as well as Windows