summaryrefslogtreecommitdiffstats
path: root/Modules/_posixsubprocess.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26862: SYS_getdents64 does not need to be defined on android API 21.Xavier de Gaye2016-06-151-2/+1
|
* Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | private functions.
* Issue #25764: Merge subprocess fix from 3.4 into 3.5Martin Panter2015-12-051-17/+18
|\
| * Issue #25764: Preserve subprocess fork exception when preexec_fn usedMartin Panter2015-11-301-17/+18
| | | | | | | | Also fix handling of failure to release the import lock.
* | Fixes #23564: Fix a partially broken sanity check in the _posixsubprocessGregory P. Smith2015-11-161-1/+2
| | | | | | | | | | internals regarding how fds_to_pass were passed to the child. The bug had no actual impact as subprocess.py already avoided it.
* | Close #24784: Fix compilation without thread supportVictor Stinner2015-10-111-2/+10
| | | | | | | | | | | | | | | | Add "#ifdef WITH_THREAD" around cals to: * PyGILState_Check() * _PyImport_AcquireLock() * _PyImport_ReleaseLock()
* | Fix computation of max_fd on OpenBSD. Issue #23852.Gregory P. Smith2015-04-261-0/+10
|\ \ | |/
| * Fix computation of max_fd on OpenBSD. Issue #23852.Gregory P. Smith2015-04-261-0/+10
| |
* | Issue9951: update _hashopenssl and md5module to use _Py_strhex().Gregory P. Smith2015-04-251-1/+1
| | | | | | | | Also update _posixsubprocess to use Py_hexdigits instead of its own constant.
* | Merge 3.4 (_posixsubprocess)Victor Stinner2015-04-021-6/+6
|\ \ | |/
| * Issue #23851: close() must not be retried when it fails with EINTRVictor Stinner2015-04-021-6/+6
| | | | | | | | See the PEP 475 for the rationale.
* | Issue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() ofVictor Stinner2015-04-011-9/+10
| | | | | | | | _posixsubprocess
* | Issue #23694: Fix usage of _Py_open() in the _posixsubprocess moduleVictor Stinner2015-03-301-2/+1
| | | | | | | | | | | | | | Don't call _Py_open() from _close_open_fds_safe() because it is call just after fork(). It's not good to play with locks (the GIL) between fork() and exec(). Use instead _Py_open_noraise() which doesn't touch to the GIL.
* | Issue #23694: Enhance _Py_open(), it now raises exceptionsVictor Stinner2015-03-171-0/+1
|/ | | | | | | | * _Py_open() now raises exceptions on error. If open() fails, it raises an OSError with the filename. * _Py_open() now releases the GIL while calling open() * Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not held
* Issue #22290: Fix error handling in the _posixsubprocess module.Victor Stinner2014-10-051-6/+14
| | | | | | | | * Don't call the garbage collector with an exception set: it causes an assertion to fail in debug mode. * Enhance also error handling if allocating an array for the executable list failed. * Add an unit test for 4 different errors in the _posixsubprocess module.
* Fix the comment to not refer to the removed end_fd parameter.Gregory P. Smith2014-06-011-2/+2
|
* Don't restrict ourselves to a "max" fd when closing fds before exec()Gregory P. Smith2014-06-011-43/+44
| | | | | | | | | when we have a way to get an actual list of all open fds from the OS. Fixes issue #21618: The subprocess module would ignore fds that were inherited by the calling process and already higher than POSIX resource limits would otherwise allow. On systems with a functioning /proc/self/fd or /dev/fd interface the max is now ignored and all fds are closed.
* Add conditional code for android's lack of definition of SYS_getdent64.Gregory P. Smith2014-04-141-0/+6
| | | | | | Fixes issue20307. No Misc/NEWS entry because frankly this is an esoteric platform for anyone to be figuring out how to cross compile CPython for.
* Undo supposed fix for Issue #15798 until I understand why this isGregory P. Smith2013-12-011-1/+5
|\ | | | | | | | | causing test_multiprocessing_forkserver and test_multiprocessing_spawn failures on head (3.4).
| * Undo supposed fix for Issue #15798 until I understand why this isGregory P. Smith2013-12-011-1/+5
| | | | | | | | | | causing test_multiprocessing_forkserver and test_multiprocessing_spawn failures on head (3.4).
* | Fixes Issue #15798 - subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-011-5/+1
|\ \ | |/ | | | | descriptor 0, 1 or 2 is closed.
| * Fixes Issue #15798 - subprocess.Popen() no longer fails if fileGregory P. Smith2013-12-011-5/+1
| | | | | | | | descriptor 0, 1 or 2 is closed.
* | Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-89/+51
| | | | | | | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* | Merge.Charles-François Natali2013-08-251-11/+12
|\ \ | |/
| * Issue #18763: subprocess: The file descriptors are now closed after calling theCharles-François Natali2013-08-251-11/+12
| | | | | | | | preexec_fn callback, which may open file descriptors.
* | Fixes Issue #16962: Use getdents64 instead of the obsolete getdents syscallGregory P. Smith2013-03-031-14/+8
|\ \ | |/ | | | | in the subprocess module on Linux.
| * Issue #16962: Use getdents64 instead of the obsolete getdents syscall inGregory P. Smith2013-03-031-14/+8
| | | | | | | | the subprocess module on Linux.
* | Raise our own SubprocessError rather than a RuntimeError in when dealing withGregory P. Smith2012-11-111-1/+1
|/ | | | odd rare errors coming from the subprocess module.
* Fixes Issue #16114: The subprocess module no longer provides aGregory P. Smith2012-10-101-1/+6
|\ | | | | | | | | | | misleading error message stating that args[0] did not exist when either the cwd or executable keyword arguments specified a path that did not exist.
| * Fixes Issue #16114: The subprocess module no longer provides aGregory P. Smith2012-10-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | misleading error message stating that args[0] did not exist when either the cwd or executable keyword arguments specified a path that did not exist. It now keeps track of if the child got as far as preexec and reports it if not back to the parent via a special "noexec" error message value in the error pipe so that the cwd can be blamed for a failed chdir instead of the exec of the executable being blamed instead. The executable is also always reported accurately when exec fails. Unittests enhanced to cover these cases.
* | Merge with 3.2Ross Lagerwall2012-08-241-1/+3
|\ \ | |/
| * Issue 15777: Fix a refleak in _posixsubprocess.Ross Lagerwall2012-08-241-1/+3
| | | | | | | | It was exposed by 03c98d05b140 and dbbf3ccf72e8.
* | Merge 3.2.Stefan Krah2012-08-201-0/+2
|\ \ | |/
| * Issue #15738: Fix a missing NULL check in subprocess_fork_exec().Stefan Krah2012-08-201-0/+2
| |
* | Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-4/+3
|\ \ | |/ | | | | | | | | errors correctly. Patch by Serhiy Storchaka.
| * Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-0/+2
| | | | | | | | | | | | errors correctly. Patch by Serhiy Storchaka.
* | Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.Gregory P. Smith2012-06-051-0/+7
|\ \ | |/
| * Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.Gregory P. Smith2012-06-051-0/+7
| |
| * Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.Ross Lagerwall2012-03-191-1/+12
| | | | | | | | Based on patch from Hervé Coatanhay.
* | Issue 14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.Ross Lagerwall2012-03-181-1/+12
| | | | | | | | Based on patch from Hervé Coatanhay.
* | Use ANSI C prototype instead of K&R style.Ross Lagerwall2012-03-071-1/+1
| |
* | merge 3.2Benjamin Peterson2012-01-231-24/+31
|\ \ | |/
| * fix declaration styleBenjamin Peterson2012-01-231-24/+31
| |
* | Fix FreeBSD, NetBSD and OpenBSD behavior of the issue #8052 fix.Gregory P. Smith2012-01-221-9/+47
|\ \ | |/
| * Fix FreeBSD, NetBSD and OpenBSD behavior of the issue #8052 fix.Gregory P. Smith2012-01-221-9/+47
| |
* | bugfix for *BSD platforms. (oops messed up #define)Gregory P. Smith2012-01-211-4/+2
|\ \ | |/
| * Another issue #8052 bugfix (related to previous commit).Gregory P. Smith2012-01-211-4/+2
| | | | | | | | "oops" while rearranging the #defines.
* | bugfix for issue 8052 fixes on *BSD platforms.Gregory P. Smith2012-01-211-9/+13
|\ \ | |/
| * Bugfix for issue #8052 fix on *BSD variants.Gregory P. Smith2012-01-211-9/+13
| | | | | | | | | | Many lack readdir64, use readdir. Only use readdir64 on solaris where it is required to work around a solaris bug.
* | Fixes issue #8052: The posix subprocess module's close_fds behavior wasGregory P. Smith2012-01-211-35/+258
|\ \ | |/ | | | | | | | | | | | | suboptimal by closing all possible file descriptors rather than just the open ones in the child process before exec(). It now closes only the open fds when it is possible to safely determine what those are.