Commit Graph

38 Commits

Author SHA1 Message Date
Peter Astrand 39e23b2bfa Applied patch 1124861.3.patch to solve bug #1124861: Automatically create pipes on Windows, if GetStdHandle fails. Backport from rev 53646. 2007-02-06 15:41:46 +00:00
Peter Astrand bb6a0edce1 Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181. Backport from rev. 53295. 2007-01-21 15:45:25 +00:00
Peter Astrand 29794ecd43 Fix for bug #1634343: allow specifying empty arguments on Windows 2007-01-13 22:37:11 +00:00
Peter Astrand 6cdc34672c Re-implemented fix for #1531862 once again, in a way that works with Python 2.2. Fixes bug #1603424. 2007-01-07 09:00:11 +00:00
Neal Norwitz e38ecee5c3 SF bug #1623890, fix argument name in docstring 2006-12-29 03:01:06 +00:00
Georg Brandl 0d3de7612c Bug #1357915: allow all sequence types for shell arguments in
subprocess.
 (backport from rev. 52522)
2006-10-29 09:05:08 +00:00
Gustavo Niemeyer d1b1b8c882 Fixed bug #1531862: Do not close standard file descriptors in subprocess.
Let's try that once more. Buildbots were broken last time, but probably
because tests were sending data to stderr for testing it (sending to a
file doesn't touch the problem).

The fix is still the same, but tests were reduced (removing tests to
be able to fix something is weird, but oh well).
2006-09-06 22:44:51 +00:00
Neal Norwitz f3ce2ab2f1 Revert 51759 because it broke all the buildbots 2006-09-06 03:58:59 +00:00
Gustavo Niemeyer 63d675ce82 Backporting fix for bug #1531862, committed in 51758, into 2.5,
making subprocess not close standard file descriptors.
2006-09-06 02:05:35 +00:00
Georg Brandl 13cf38c0cf Guard for _active being None in __del__ method. 2006-07-20 16:28:39 +00:00
Tim Peters 73a9eade1c Whitespace normalization. 2006-07-18 21:55:15 +00:00
Peter Astrand 7d1d43630e Bug #1223937: CalledProcessError.errno -> CalledProcessError.returncode. 2006-07-14 14:04:45 +00:00
Neal Norwitz 8440483fea Fix doco. Backport candidate. 2006-07-10 00:05:34 +00:00
Peter Astrand ff355f1ada Applied patch #1506758: Prevent MemoryErrors with large MAXFD. 2006-06-22 20:21:26 +00:00
Georg Brandl ad62489e47 Bug #1500293: fix memory leaks in _subprocess module. 2006-06-04 22:15:37 +00:00
Neal Norwitz a6d01cec3f Try to fix breakage caused by patch #1479181, r45850 2006-05-02 06:23:22 +00:00
Martin v. Löwis 17de8ffc21 Patch #1467770: Add Popen objects to _active only in __del__.
Introduce _child_active member to keep track on whether a child
needs to be waited for.
Backport candidate.
2006-04-10 15:55:37 +00:00
Peter Astrand 3a708dfc88 Changed license header: Now simply referring to PSF. This closes bug
1138653.
2005-09-23 17:37:29 +00:00
Tim Peters eba28bea9b Whitespace normalization. 2005-03-28 01:08:02 +00:00
Peter Astrand 7e78ade6f9 Corrected bug in list2cmdline wrt backslashes. Fixes #1083306. 2005-03-03 21:10:23 +00:00
Peter Astrand 23109f0009 Optimization for communicate(): If only one of stdin/stdout/stderr is
redirected, using select() or threads is unnecessary.
2005-03-03 20:28:59 +00:00
Peter Astrand c26516b29d Made the module compatible with Python 2.2 again. 2005-02-21 08:13:02 +00:00
Peter Astrand 69bf13f1e8 Added copyright notice:
Licensed to PSF under a Contributor Agreement.
2005-02-14 08:56:32 +00:00
Peter Astrand d38ddf4ca2 Patch from Leandro Lucarella: replaced:
var == None and var != None
with
var is None and var is not None

and type(var) == int
with
instanceof(var, int)

...as recomended in PEP 8 [1].
2005-02-10 08:32:50 +00:00
Raymond Hettinger f715366f23 Reduce the usage of the types module. 2005-02-07 14:16:21 +00:00
Peter Astrand f791d7a278 On UNIX, when the execution of the child fails, we must waitpid() to
prevent leaving zombies.
2005-01-01 09:38:57 +00:00
Peter Astrand 454f76711c New subprocess utility function: check_call. Closes #1071764. 2005-01-01 09:36:35 +00:00
Peter Astrand 5f5e141589 Changed signature of call function to avoid confusion: this 'args' is not the same as the one to the Popen constructor 2004-12-05 20:15:36 +00:00
Peter Astrand 738131d391 Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified. 2004-11-30 21:04:45 +00:00
Peter Astrand 6fdf3cbb13 Corrected example for replacing shell pipeline. Fixes bug 1073790. 2004-11-30 18:06:42 +00:00
Peter Astrand c1d6536d60 When using shell=True on Windows, don't display a shell window by default. Fixes #1057061. 2004-11-07 14:30:34 +00:00
Raymond Hettinger 837dd93e3b Fix docstring formatting of escape sequences. 2004-10-17 16:36:53 +00:00
Fredrik Lundh 15aaacc93e return codes are available on all platforms, not just on Unix 2004-10-17 14:47:05 +00:00
Fredrik Lundh 3e73a011d9 Replace dynamic try/except with "if 0", to keep py2exe happy. If you
want to use pywin32 instead of _subprocess, you have to edit the file.
2004-10-13 18:19:18 +00:00
Tim Peters e8374a55c4 Folded long lines. 2004-10-13 03:15:00 +00:00
Tim Peters e718f615b8 Whitespace normalization. 2004-10-12 21:51:32 +00:00
Andrew M. Kuchling 51ee66e611 Typo fix 2004-10-12 16:38:42 +00:00
Fredrik Lundh 5b3687df2e Added Peter Astrand's subprocess module. 2004-10-12 15:26:28 +00:00