cpython/Python
Miss Islington (bot) b90c68586e bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)
Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process.  This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.

This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions).  `ioctl` is not a POSIX async-signal-safe approved function.

ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
(cherry picked from commit c1e46e94de)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
2018-02-05 22:51:10 -08:00
..
clinic [3.6] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166). (#3491) 2017-09-11 09:26:15 +03:00
_warnings.c [3.6] bpo-31285: Remove splitlines identifier from Python/_warnings.c (GH-3803) (#3829) 2017-09-29 22:26:45 +03:00
asdl.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
ast.c Don't hide unexpected errors in PyErr_WarnExplicitObject(). (GH-4585) (#4662) 2017-12-01 09:21:45 +02:00
bltinmodule.c bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5489) 2018-02-02 08:32:19 -05:00
ceval.c [3.6] bpo-31492: Fix assertion failures in case of a module with a bad __name__ attribute. (GH-3620). (#3773) 2017-09-27 07:33:00 +03:00
ceval_gil.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
codecs.c Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
compile.c bpo-32365: Fix a reference leak when compile __debug__. (GH-4916) (#4918) 2017-12-18 15:11:51 +02:00
condvar.h Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
dtoa.c [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) 2017-09-12 16:09:44 -07:00
dup2.c Merged revisions 85236 via svnmerge from 2010-10-05 22:18:29 +00:00
dynamic_annotations.c Make (most of) Python's tests pass under Thread Sanitizer. 2010-05-03 19:29:34 +00:00
dynload_aix.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_dl.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_hpux.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_next.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_shlib.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_stub.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_win.c [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462) 2017-06-28 09:27:35 +03:00
errors.c [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). (#4135) 2017-10-26 17:48:48 +02:00
fileutils.c bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563) 2018-02-05 22:51:10 -08:00
formatter_unicode.c [3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192) 2018-01-15 23:23:47 +01:00
frozen.c Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode. 2016-05-24 09:15:14 +03:00
frozenmain.c Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failure 2015-11-30 03:18:29 +00:00
future.c Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize 2016-11-20 09:13:07 +02:00
getargs.c [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522) 2018-02-03 21:00:24 -05:00
getcompiler.c [3.6] remove tabs from getcompiler.c (GH-3892) (#3893) 2017-10-05 08:41:06 -07:00
getcopyright.c advance copyright years to 2018 (GH-5094) (#5104) 2018-01-05 23:12:14 -08:00
getopt.c #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
getplatform.c
getversion.c Merged revisions 83352,83355-83358,83362,83366,83368-83369 via svnmerge from 2010-08-01 19:17:57 +00:00
graminit.c Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
import.c [3.6] bpo-30876: Relative import from unloaded package now reimports the package (GH-2639) (#2676) 2017-07-16 07:44:25 +03:00
importdl.c [3.6] bpo-31315: Fix an assertion failure in imp.create_dynamic(), when spec.name is not a string. (GH-3257) (#3653) 2017-09-19 15:51:19 +03:00
importdl.h PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
importlib.h [3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504) 2018-02-02 23:21:14 -05:00
importlib_external.h [3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504) 2018-02-02 23:21:14 -05:00
makeopcodetargets.py makeopcodetargets.py: we need to import Lib/opcode.py 2016-03-26 01:04:37 +01:00
marshal.c bpo-32011: Revert "Issue GH-15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (GH-4381) (#4405) 2017-11-15 18:05:58 +02:00
modsupport.c va_end() all va_copy()ed va_lists. 2016-09-21 11:37:27 +02:00
mysnprintf.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
mystrtoul.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
opcode_targets.h Issue #28257: Improved error message when pass a non-iterable as 2016-10-02 10:33:46 +03:00
peephole.c [3.6] bpo-30416: Protect the optimizer during constant folding. (#4865) 2017-12-15 14:12:14 +02:00
pyarena.c Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects 2013-07-07 17:18:53 +02:00
pyctype.c Include files missed in r72044. 2009-04-27 20:54:42 +00:00
pyfpe.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
pyhash.c [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) 2017-09-12 16:09:44 -07:00
pylifecycle.c bpo-32329: Fix sys.flags.hash_randomization (#4875) 2017-12-15 01:39:48 +01:00
pymath.c Issue 24366: Indent code (thanks to li4ick for reporting). 2015-06-02 18:53:46 -04:00
pystate.c bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655) 2017-11-30 23:36:49 +01:00
pystrcmp.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
pystrhex.c Silence a gcc "may be used uninitialized" compiler warning. Not true. 2015-04-25 23:51:39 -07:00
pystrtod.c Issue #26331: Implement the parsing part of PEP 515. 2016-09-09 14:57:09 -07:00
Python-ast.c bpo-31095: fix potential crash during GC (GH-3195) 2017-09-04 12:31:09 +09:00
pythonrun.c [3.6] bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160). (#4379) 2017-11-12 17:33:16 +01:00
pytime.c [3.6] bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (GH-4003). (#4022) 2017-10-18 11:12:47 +03:00
random.c bpo-32329: Fix sys.flags.hash_randomization (#4875) 2017-12-15 01:39:48 +01:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
sigcheck.c
strdup.c Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
structmember.c Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize 2016-11-20 09:13:07 +02:00
symtable.c Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. 2016-11-16 10:19:20 +02:00
sysmodule.c [3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970) 2017-06-06 19:23:02 +03:00
thread.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
thread_foobar.h Issue #21312: Update the thread_foobar.h template file to include newer threading APIs. Patch by Jack McCracken. 2014-04-28 21:12:11 +02:00
thread_nt.h Fix typo in thread_nt.h code comment (GH-5211) (GH-5226) 2018-01-17 16:40:33 -08:00
thread_pthread.h [3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2418) 2017-06-26 21:57:28 +02:00
traceback.c [3.6] bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (GH-4289) (#4406) 2017-11-15 18:04:46 +02:00
wordcode_helpers.h [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) 2017-09-12 16:09:44 -07:00

Miscellaneous source files for the main Python shared library