cpython/Doc/c-api
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
..
abstract.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
allocation.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
arg.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
bool.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
buffer.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
bytearray.rst fix grammar 2008-05-30 20:44:39 +00:00
cell.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
class.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
cobject.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
complex.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
concrete.rst add PyByteArray docs 2008-05-26 15:54:26 +00:00
conversion.rst Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from 2009-01-03 21:55:17 +00:00
datetime.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
descriptor.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
dict.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
exceptions.rst Merged revisions 68582,68718,68720-68721,68724-68727,68859,68973,69288-69289,69293,69295,69297-69301,69409,69414,69570,69573,69576,69728-69730,69769,69776,69803-69805,69840,69896 via svnmerge from 2009-02-23 10:41:11 +00:00
file.rst Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from 2009-01-03 21:55:17 +00:00
float.rst - Issue #2862: Make int and float freelist management consistent with other 2008-07-06 03:35:58 +00:00
function.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
gcsupport.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
gen.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
import.rst #2160: document PyImport_GetImporter. 2008-03-21 20:55:20 +00:00
index.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
init.rst Merged revisions 74841 via svnmerge from 2009-09-16 20:06:36 +00:00
int.rst - Issue #2862: Make int and float freelist management consistent with other 2008-07-06 03:35:58 +00:00
intro.rst Merged revisions 72007-72010,72036-72037 via svnmerge from 2009-04-28 18:23:28 +00:00
iter.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
iterator.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
list.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
long.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
mapping.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
marshal.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
memory.rst Issue #2620: Overflow checking when allocating or reallocating memory 2008-07-22 04:46:32 +00:00
method.rst 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
module.rst Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from 2009-01-03 21:55:17 +00:00
none.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
number.rst Fix 'the the'; grammar fix (backport of r71102 2009-04-03 21:55:34 +00:00
objbuffer.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
object.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
objimpl.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
refcounting.rst Fix markup. 2007-12-05 19:49:21 +00:00
reflection.rst Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from 2009-01-03 21:55:17 +00:00
sequence.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
set.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
slice.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
string.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
structures.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
sys.rst Missed one big file to split up. 2008-01-19 22:14:27 +00:00
tuple.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
type.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
typeobj.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
unicode.rst Merged revisions 71873-71874,71882,71890,71893,71898-71900,71910,71914-71923,71925-71929,71931-71934,71937 via svnmerge from 2009-04-29 08:00:05 +00:00
utilities.rst Missed one big file to split up. 2008-01-19 22:14:27 +00:00
veryhigh.rst Merged revisions 70642,70648,70656,70661,70765,70773,70789,70824-70825,70828,70830,70832,70836,70838,70842,70851,70855,70857-70858 via svnmerge from 2009-04-05 21:11:43 +00:00
weakref.rst Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00