cpython/Python
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
..
Python-ast.c update ast version 2009-07-17 19:11:02 +00:00
_warnings.c Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
asdl.c
ast.c Merged revisions 75223 via svnmerge from 2009-10-03 20:27:13 +00:00
bltinmodule.c refactor logic a little when no sep or end is passed 2009-07-02 18:25:26 +00:00
ceval.c silence with (void) two warnings about computed and unused value of POP() 2009-10-03 16:14:07 +00:00
codecs.c Rename utf8b error handler to surrogateescape. 2009-05-10 08:15:24 +00:00
compile.c Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
dtoa.c Refactor to remove duplicated nan/inf parsing code in 2009-05-20 22:05:25 +00:00
dup2.c
dynload_aix.c
dynload_atheos.c
dynload_dl.c
dynload_hpux.c
dynload_next.c
dynload_os2.c
dynload_shlib.c
dynload_stub.c
dynload_win.c Merged revisions 69038 via svnmerge from 2009-01-27 23:46:57 +00:00
errors.c Merged revisions 72698-72699 via svnmerge from 2009-05-17 04:21:53 +00:00
formatter_unicode.c Issue #1588: Add complex.__format__. 2009-04-30 01:00:33 +00:00
frozen.c
frozenmain.c #4004: Missing newline in some startup error messages. 2008-10-07 21:06:18 +00:00
future.c The BDFL has retired! Long live the FLUFL (Friendly Language Uncle For Life)! 2009-04-01 05:08:41 +00:00
getargs.c - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with 2009-08-01 23:55:06 +00:00
getcompiler.c
getcopyright.c Merged revisions 68112,68115,68120,68133,68141-68142,68145-68146,68148-68149 via svnmerge from 2009-01-03 22:33:39 +00:00
getcwd.c
getopt.c
getplatform.c
getversion.c
graminit.c fix an ambiguity in the grammar from the implementation of extended unpacking 2009-09-27 02:43:28 +00:00
import.c Merged revisions 74841 via svnmerge from 2009-10-04 20:32:25 +00:00
importdl.c
importdl.h
makeopcodetargets.py Make Python/makeopcodetargets runnable with Python 2.3. With any luck, this 2009-01-31 12:12:41 +00:00
marshal.c Merged revisions 75141 via svnmerge from 2009-09-29 19:21:35 +00:00
modsupport.c Py_BuildValue's 'c' code should use byte strings #5666 2009-04-03 22:18:11 +00:00
mysnprintf.c Removed unused #include. 2009-04-07 22:55:31 +00:00
mystrtoul.c
opcode_targets.h Merged revisions 72912,72920,72940 via svnmerge from 2009-06-28 03:18:59 +00:00
peephole.c Merged revisions 73683,73786 via svnmerge from 2009-07-21 02:51:58 +00:00
pyarena.c
pyctype.c Include files missed in r72044. 2009-04-27 20:54:42 +00:00
pyfpe.c
pymath.c The SSE2 detection and enabling could potentially cause 2009-04-18 20:17:52 +00:00
pystate.c Issue #3327: Don't overallocate in the modules_by_index list. 2008-11-17 16:22:11 +00:00
pystrcmp.c
pystrtod.c Refactor to remove duplicated nan/inf parsing code in 2009-05-20 22:05:25 +00:00
pythonrun.c bytes -> bytearray 2009-05-10 23:43:14 +00:00
sigcheck.c
strdup.c
structmember.c Rename PyUnicode_AsString -> _PyUnicode_AsString and 2008-08-07 18:54:33 +00:00
symtable.c Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from 2009-06-28 19:19:51 +00:00
sysmodule.c Merged revisions 73665,73693,73704-73705,73707,73712-73713,73824 via svnmerge from 2009-07-17 11:43:26 +00:00
thread.c Merged revisions 68455,68476,68542 via svnmerge from 2009-01-12 08:21:03 +00:00
thread_atheos.h
thread_cthread.h
thread_foobar.h
thread_lwp.h
thread_nt.h Merged revisions 68455,68476,68542 via svnmerge from 2009-01-12 08:21:03 +00:00
thread_os2.h
thread_pth.h
thread_pthread.h
thread_sgi.h
thread_solaris.h
thread_wince.h
traceback.c Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00