summaryrefslogtreecommitdiffstats
path: root/Modules/_posixsubprocess.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * 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.
* | Avoid the compiler warning about the unused return value.Gregory P. Smith2012-01-211-6/+9
|\ \ | |/
| * Avoid the compiler warning about the unused return value.Gregory P. Smith2012-01-211-6/+9
| |
| * Don't redefine _GNU_SOURCE if it's already defined.Ross Lagerwall2011-12-221-2/+2
| |
* | Merge with 3.2 for #11006.Ross Lagerwall2011-12-221-6/+0
|\ \ | |/
| * Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.Ross Lagerwall2011-12-221-6/+0
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-3/+3
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-3/+8
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Issue #12607: Merge with 3.2.Ross Lagerwall2011-07-271-0/+7
|\ \ | |/
| * Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr isRoss Lagerwall2011-07-271-0/+7
| | | | | | | | given as a low fd, it gets overwritten.
| * Fix issue #11432. if the stdin pipe is the same file descriptor as either ↵Gregory P. Smith2011-03-151-2/+2
| | | | | | | | | | | | | | stdout or stderr in the _posixsubprocess C extension module it would unintentionally close the fds and raise an error.
* | _posixsubprocess.c: don't redefine _GNU_SOURCE if it's already definedVictor Stinner2011-05-261-2/+2
| |
* | Fix issue #11432. if the stdin pipe is the same file descriptor as either ↵Gregory P. Smith2011-03-151-2/+2
|/ | | | | | | stdout or stderr in the _posixsubprocess C extension module it would unintentionally close the fds and raise an error.
* Issue #10806, issue #9905: Fix subprocess pipes when some of the standardAntoine Pitrou2011-01-031-8/+21
| | | | | file descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross Lagerwall.
* issue10802: fallback to pipe+fcntl when the pipe2 syscall fails with errno ↵Gregory P. Smith2011-01-021-17/+29
| | | | ENOSYS.