cpython/Doc/c-api
Benjamin Peterson 0df35a93a2 Merged revisions 74841 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74841 | thomas.wouters | 2009-09-16 14:55:54 -0500 (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-10-04 20:32:25 +00:00
..
abstract.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
allocation.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
arg.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
bool.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
buffer.rst the old buffer object doesn't exist in Python 3 #6659 2009-08-26 07:35:45 +00:00
bytearray.rst Merged revisions 74958 via svnmerge from 2009-09-20 07:19:57 +00:00
bytes.rst remove docs for PyBytes_Format #4917 2009-01-12 00:28:16 +00:00
capsule.rst #5946: fix speling. 2009-05-06 08:32:17 +00:00
cell.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
code.rst Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
complex.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
concrete.rst Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
conversion.rst Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. 2009-05-05 14:04:18 +00:00
datetime.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
descriptor.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
dict.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
exceptions.rst Fix segfaults when running test_exceptions with coverage tracing, caused by wrongly defining Exception.__context__ as a T_OBJECT structmember which does not set the member to NULL on None assignment, and generally does not do type checks. This could be used to crash the interpreter by setting any object to __context__. The same applies to __cause__. Also document the PyException_* functions. 2009-03-31 04:16:10 +00:00
file.rst Remove trailing whitespace. 2009-01-03 21:18:54 +00:00
float.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
function.rst Mention the behaviour of PyFunction_SetAnnotations() on error. 2008-07-13 22:28:42 +00:00
gcsupport.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
gen.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
import.rst Merged revisions 74209 via svnmerge from 2009-07-26 14:54:51 +00:00
index.rst Fix two oversights in C API split. 2008-01-20 11:00:14 +00:00
init.rst Merged revisions 74841 via svnmerge from 2009-10-04 20:32:25 +00:00
intro.rst Merged revisions 72009 via svnmerge from 2009-04-27 16:20:50 +00:00
iter.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
iterator.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
list.rst Merged revisions 73190,73213,73257-73258,73260,73275,73294 via svnmerge from 2009-06-08 13:41:29 +00:00
long.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
mapping.rst more list()s on dictviews 2009-09-13 04:48:45 +00:00
marshal.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
memory.rst Merged revisions 65182 via svnmerge from 2008-07-23 16:13:07 +00:00
method.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
module.rst #4614: document PyModule_Create and PyModuleDef struct. 2009-01-04 23:20:14 +00:00
none.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
number.rst #6115: remove entries for the already removed PyNumber_Divide and PyNumber_InPlaceDivide from the header and the docs. 2009-05-26 16:43:13 +00:00
objbuffer.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
object.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
objimpl.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
refcounting.rst Merged revisions 59333-59370 via svnmerge from 2007-12-05 20:18:38 +00:00
reflection.rst Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
sequence.rst Merged revisions 72506,72525-72526,72551,72558,72616,72654-72655,72689,72745,72750,72802,72812,72822,72824,72826-72827,72833,72876,72890,72923,72946,73026,73042,73045,73047,73065,73068-73069 via svnmerge from 2009-06-01 22:42:33 +00:00
set.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
slice.rst After discussing some more with Georg, do no migrate versionchanged:: 2.5 to 2009-04-27 08:07:12 +00:00
structures.rst #6421: The self argument of module-level PyCFunctions is now a reference to the module object. 2009-07-11 10:43:08 +00:00
sys.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
tuple.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
type.rst Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from 2009-07-29 19:54:39 +00:00
typeobj.rst #6754: remove old struct member nb_inplace_divide. 2009-09-01 08:02:03 +00:00
unicode.rst Merged revisions 74779-74786,74793,74795,74811,74860-74861,74863,74876,74886,74896,74901,74903,74908,74912,74930,74933,74943,74946,74952-74955,75015,75019,75032,75068,75076,75095,75098,75102,75129,75139,75230 via svnmerge from 2009-10-04 14:49:41 +00:00
utilities.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00
veryhigh.rst Merged revisions 70712,70714,70764-70765,70769-70771,70773,70776-70777,70788-70789,70824,70828,70832,70836,70842,70851,70855,70857,70866-70872,70883,70885,70893-70894,70896-70897,70903,70905-70907,70915,70927,70933,70951,70960,70962-70964,70998,71001,71006,71008,71010-71011,71019,71037,71056,71094,71101-71103,71106,71119,71123,71149-71150,71203,71212,71214-71217,71221,71240 via svnmerge from 2009-04-05 19:13:16 +00:00
weakref.rst Split C API docs in Py3k branch. 2008-01-20 09:30:57 +00:00