Commit Graph

48 Commits

Author SHA1 Message Date
Amaury Forgeot d'Arc
ce32eb7406 #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)
2009-07-09 22:37:22 +00:00
Gregory P. Smith
dd7ca24eb5 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.

Candidate for backporting to release26-maint as it is a bug fix and changes no
public API.
2009-07-04 01:49:29 +00:00
Benjamin Peterson
5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Georg Brandl
f3715d2fc7 #5179: don't leak PIPE fds when child execution fails. 2009-02-14 17:01:36 +00:00
Gregory P. Smith
26576801a6 rename the new check_call_output to check_output. its less ugly. 2008-12-05 02:27:01 +00:00
Gregory P. Smith
97f49f4be7 Adds a subprocess.check_call_output() function to return the output from a
process on success or raise an exception on error.
2008-12-04 20:21:09 +00:00
Gregory P. Smith
4036fd4b75 Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until
the last reference to the Popen instance was dropped.  Adding explicit
close() calls fixes it.

Candidate for backport to release25-maint.
2008-05-26 20:22:14 +00:00
Gregory P. Smith
af8a68733f fix issue2381: test_subprocess fails if your sys.executable is on a
path with a space in it.
2008-05-17 07:17:34 +00:00
Christian Heimes
c2ca6db143 Disabled some unit tests for the upcoming release. See #2777 2008-05-06 23:42:58 +00:00
Christian Heimes
e74c8f2879 Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
2008-04-19 02:23:57 +00:00
Gregory P. Smith
70eb2f91b4 Fix issue 1300: Quote command line arguments that contain a '|' character in
subprocess.list2cmdline (windows).
2008-01-19 22:49:37 +00:00
Gregory P. Smith
e047e6dd09 fix comment typos, use not arg instead of arg == "", add test coverage
for inside of the final if needquotes: within subprocess.list2cmdline().
2008-01-19 20:49:02 +00:00
Guido van Rossum
e9a0e885db Patch #1672 by Joseph Armbruster. Use tempdir() to get a temporary directory. 2007-12-20 17:28:10 +00:00
Peter Astrand
81a191b351 Applied patch 1669481, slightly modified: Support close_fds on Win32 2007-05-26 22:18:20 +00:00
Peter Astrand
10514a70ac Fix for bug #1634343: allow specifying empty arguments on Windows 2007-01-13 22:35:35 +00:00
Gustavo Niemeyer
c36bede6ff Fixed subprocess bug #1531862 again, after removing tests
offending buildbot
2006-09-07 00:48:33 +00:00
Neal Norwitz
314bef9fff Revert 51758 because it broke all the buildbots 2006-09-06 03:58:34 +00:00
Gustavo Niemeyer
8cb64eaaf3 Fixing #1531862: Do not close standard file descriptors in the
subprocess module.
2006-09-06 01:58:52 +00:00
Tim Peters
4edcba69f3 Whitespace normalization. 2006-08-02 03:27:46 +00:00
Andrew M. Kuchling
86e1e38059 [Patch #1520905] Attempt to suppress core file created by test_subprocess.py.
Patch by Douglas Greiman.

The test_run_abort() testcase produces a core file on Unix systems,
even though the test is successful. This can be confusing or alarming
to someone who runs 'make test' and then finds that the Python
interpreter apparently crashed.
2006-08-01 18:16:15 +00:00
Peter Astrand
7d1d43630e Bug #1223937: CalledProcessError.errno -> CalledProcessError.returncode. 2006-07-14 14:04:45 +00:00
Peter Astrand
2b221ed657 Make it possible to run test_subprocess.py with Python 2.2, which lacks test_support.reap_children(). 2006-07-10 20:39:49 +00:00
Tim Peters
38ff36c4cc Whitespace normalization. 2006-06-30 06:18:39 +00:00
Neal Norwitz
b15ac3169d Add new utility function, reap_children(), to test_support. This should
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?).  This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children.  The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either.  Time will tell.
2006-06-29 04:10:08 +00:00
Peter Astrand
d6b2430b7a Make it possible to run test_subprocess.py on Python 2.2, which lacks test_support.is_resource_enabled. 2006-06-22 20:06:46 +00:00