Commit Graph

10 Commits

Author SHA1 Message Date
Gregory P. Smith abcfcba61c issue10802: fallback to pipe+fcntl when the pipe2 syscall fails with errno ENOSYS. 2011-01-02 20:52:48 +00:00
Gregory P. Smith 14affb84ca fix a compiler warning about err_msg potentially being used uninitialized. 2010-12-22 05:22:17 +00:00
Gregory P. Smith 8edd99d085 Issue #6559: fix the subprocess.Popen pass_fds implementation. Add a unittest.
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.
2010-12-14 13:43:30 +00:00
Gregory P. Smith 51ee270876 issue7213: Open the pipes used by subprocesses with the FD_CLOEXEC flag from
the C code, using pipe2() when available.  Adds unittests for close_fds and
cloexec behaviors.
2010-12-13 07:59:39 +00:00
Gregory P. Smith d4cc7bf993 issue6559: Adds a pass_fds parameter to subprocess.Popen that allows the caller
to list exactly which file descriptors should be kept open.
2010-12-04 11:22:11 +00:00
Victor Stinner dcb2403022 Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,
you have to convert your bytearray filenames to bytes
2010-04-22 12:08:36 +00:00
Victor Stinner 0e59cc3fc3 Issue #8393: subprocess accepts bytes, bytearray and str with surrogates for
the current working directory.

Remove also a trailing space, and replace tabulation indentation by spaces.
2010-04-16 23:49:32 +00:00
Gregory P. Smith 32ec9da166 * Fix a refleak when a preexec_fn was supplied (preexec_fn_args_tuple was not
being defref'ed).
* Fixes another potential refleak of a reference to the gc
  module in the unlikely odd case where gc module isenabled or disable calls
  fail.
* Adds a unittest for the above case to verify behavior and lack of leaks.
2010-03-19 16:53:08 +00:00
Gregory P. Smith 68f52178d9 * Fix the refcount leak in _PySequence_BytesToCharpArray from r78946.
* Also fixes a potential extra DECREF of an arg in the error case within
  _posixsubprocess.fork_exec() by not reusing the process_args variable.
2010-03-15 06:07:42 +00:00
Gregory P. Smith fb94c5f1e5 * Replaces the internals of the subprocess module from fork through exec on
POSIX systems with a C extension module.  This is required in order for
  the subprocess module to be made thread safe.

  The pure python implementation is retained so that it can continue to be
  used if for some reason the _posixsubprocess extension module is not
  available.

  The unittest executes tests on both code paths to guarantee compatibility.

* Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h.

Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
2010-03-14 06:49:55 +00:00