cpython/Include
Thomas Wouters 448db2155f Merged revisions 74841 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74841 | thomas.wouters | 2009-09-16 12:55:54 -0700 (Wed, 16 Sep 2009) | 23 lines


  Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
  acquiring the import lock around fork() calls. This prevents other threads
  from having that lock while the fork happens, and is the recommended way of
  dealing with such issues. There are two other locks we care about, the GIL
  and the Thread Local Storage lock. The GIL is obviously held when calling
  Python functions like os.fork(), and the TLS lock is explicitly reallocated
  instead, while also deleting now-orphaned TLS data.

  This only fixes calls to os.fork(), not extension modules or embedding
  programs calling C's fork() directly. Solving that requires a new set of API
  functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
  warning explaining the problem to the documentation in the mean time.

  This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
  getting the import lock reallocated, seemingly to avoid this very same
  problem. This is not the right approach, because the import lock is a
  re-entrant one, and reallocating would do the wrong thing when forking while
  holding the import lock.

  Will backport to 2.6, minus the tiny AIX behaviour change.
........
2009-09-16 20:06:36 +00:00
..
Python-ast.h Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum. 2008-03-30 06:40:17 +00:00
Python.h Correct an incorrect comment about our #include of stddef.h. 2008-06-11 18:00:52 +00:00
abstract.h Issue 1242657: list(obj) can swallow KeyboardInterrupt 2009-02-02 22:44:06 +00:00
asdl.h Introduce asdl_int_seq, to hold cmpop_ty. 2006-04-13 12:29:43 +00:00
ast.h Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines, 2005-12-17 20:54:49 +00:00
bitset.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
boolobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
bufferobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
bytearrayobject.h Make the _H #define's match the header file names. Fix comments to 2008-06-01 22:57:47 +00:00
bytes_methods.h Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings. 2008-03-28 04:58:51 +00:00
bytesobject.h swap stringobject.h and bytesobject.h contents to make sense. PyString in 2008-06-11 03:40:10 +00:00
cStringIO.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
cellobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
ceval.h Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
classobject.h Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
cobject.h #3668: When PyArg_ParseTuple correctly parses a s* format, but raises an 2008-08-29 18:39:48 +00:00
code.h Patch #2477: Added from __future__ import unicode_literals 2008-03-26 22:01:37 +00:00
codecs.h Patch #1436130: codecs.lookup() now returns a CodecInfo object (a subclass 2006-03-15 11:35:15 +00:00
compile.h Patch #2477: Added from __future__ import unicode_literals 2008-03-26 22:01:37 +00:00
complexobject.h I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. 2008-04-18 23:13:07 +00:00
datetime.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
descrobject.h Merged revisions 71734,71738-71739 via svnmerge from 2009-04-20 02:09:13 +00:00
dictobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
enumobject.h Implement and apply PEP 322, reverse iteration 2003-11-06 14:06:48 +00:00
errcode.h Patch #802188: better parser error message for non-EOL following line cont. 2005-03-03 11:45:45 +00:00
eval.h - New function sys.call_tracing() allows pdb to debug code 2003-04-09 19:06:21 +00:00
fileobject.h New environment variable PYTHONIOENCODING. 2008-06-01 07:20:46 +00:00
floatobject.h - Issue #2862: Make int and float freelist management consistent with other 2008-07-06 03:35:58 +00:00
frameobject.h Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
funcobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
genobject.h #1473257: add generator.gi_code attribute that refers to 2008-01-26 14:14:20 +00:00
graminit.h #2627 Let it be known what pgen generates 2008-04-13 20:35:56 +00:00
grammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
import.h Merged revisions 74841 via svnmerge from 2009-09-16 20:06:36 +00:00
intobject.h - Issue #2862: Make int and float freelist management consistent with other 2008-07-06 03:35:58 +00:00
intrcheck.h Excise DL_EXPORT from Include. 2002-08-12 07:21:58 +00:00
iterobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
listobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
longintrepr.h Thomas Herve explained to me that PyCrypto depends on the constants. I'm adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though. 2008-02-25 17:32:07 +00:00
longobject.h Refactor and clean up str.format() code (and helpers) in advance of optimizations. 2008-05-30 18:10:04 +00:00
marshal.h Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
metagrammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
methodobject.h Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
modsupport.h Don't repeat yourself 2008-01-22 15:25:18 +00:00
moduleobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
node.h Patch #1440601: Add col_offset attribute to AST nodes. 2006-03-01 22:49:05 +00:00
object.h Merged revisions 71163 via svnmerge from 2009-04-04 16:10:42 +00:00
objimpl.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
opcode.h Speed-up dictionary constructor by about 10%. 2007-12-18 18:26:18 +00:00
osdefs.h Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses 2006-04-25 15:29:46 +00:00
parsetok.h Patch #2477: Added from __future__ import unicode_literals 2008-03-26 22:01:37 +00:00
patchlevel.h Post release version tweak. 2009-04-16 00:49:46 +00:00
pgen.h Changes from Jonathan Riehl to allow his pgen extension (PEP 269) to 2003-04-17 14:55:42 +00:00
pgenheaders.h Use Py_GCC_ATTRIBUTE instead of __attribute__. Compilers other than GCC 2002-09-15 14:09:54 +00:00
py_curses.h Merged revisions 74693 via svnmerge from 2009-09-06 21:23:05 +00:00
pyarena.h Added words about what PyArena_Malloc() does. 2006-03-02 21:14:45 +00:00
pydebug.h Implemented PEP 370 2008-05-06 22:41:46 +00:00
pyerrors.h This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
pyexpat.h Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338). 2006-06-19 23:21:25 +00:00
pyfpe.h Some patches to Lee Busby's fpectl mods that accidentally didn't make it 1997-10-20 23:50:01 +00:00
pygetopt.h Excise DL_EXPORT from Include. 2002-08-12 07:21:58 +00:00
pymacconfig.h Merged revisions 71743 via svnmerge from 2009-04-19 10:39:21 +00:00
pymactoolbox.h MacOS X: Enable 4-way universal builds 2008-06-05 12:58:24 +00:00
pymath.h Issue #5724: Fix cmath failures on Solaris 10. 2009-05-04 13:30:43 +00:00
pymem.h Issue #2620: Overflow checking when allocating or reallocating memory 2008-07-22 04:46:32 +00:00
pyport.h Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from 2009-01-14 00:00:17 +00:00
pystate.h Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167. 2007-03-12 16:11:39 +00:00
pystrcmp.h build_os2emx.patch in issue 3868 - update OS/2 EMX makefile and config files 2008-09-22 14:23:45 +00:00
pystrtod.h Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
pythonrun.h Restore support for Microsoft VC6 compiler. 2008-06-13 00:42:22 +00:00
pythread.h #1683 prevent forking from interfering in threading storage 2008-06-13 00:09:47 +00:00
rangeobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
setobject.h Nasty typo in setobject.h 2008-02-03 23:14:32 +00:00
sliceobject.h Merged revisions 71734,71738-71739 via svnmerge from 2009-04-20 02:09:13 +00:00
stringobject.h Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in anticipation of fixing issue 3140. 2008-06-24 00:42:10 +00:00
structmember.h Patch #1720595: add T_BOOL to the range of structmember types. 2008-01-21 21:23:15 +00:00
structseq.h Clean up some whitespace to be consistent with Python's C style. 2002-10-17 19:48:27 +00:00
symtable.h fix compile errors 2008-08-17 01:27:30 +00:00
sysmodule.h Re-implement the 'warnings' module in C. This allows for usage of the 2008-04-12 23:44:07 +00:00
timefuncs.h Bug 975996: Add _PyTime_DoubleToTimet to C API 2004-06-20 02:50:16 +00:00
token.h PEP-0318, @decorator-style. In Guido's words: 2004-08-02 06:10:11 +00:00
traceback.h #3342: In tracebacks, printed source lines were not indented since r62555. 2008-07-11 21:45:06 +00:00
tupleobject.h Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
ucnhash.h Avoid forward-declaring the methods array. 2006-03-10 11:20:04 +00:00
unicodeobject.h Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from 2009-01-14 00:00:17 +00:00
warnings.h wrap line 2008-05-26 19:37:11 +00:00
weakrefobject.h #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00