cpython/Python
Benjamin Peterson 5183856c17 Merged revisions 75246 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r75246 | benjamin.peterson | 2009-10-04 15:32:25 -0500 (Sun, 04 Oct 2009) | 29 lines

  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:35:30 +00:00
..
Python-ast.c
_warnings.c Merged revisions 74046 via svnmerge from 2009-07-17 07:02:18 +00:00
asdl.c
ast.c Merged revisions 75224 via svnmerge from 2009-10-03 20:28:47 +00:00
bltinmodule.c these builtins have to be initialized 2009-05-09 18:10:51 +00:00
ceval.c Merged revisions 73064 via svnmerge from 2009-05-30 21:41:10 +00:00
codecs.c Rename utf8b error handler to surrogateescape. 2009-05-10 08:15:24 +00:00
compile.c unfortunately we can't kill compiler_new_tmpname here 2009-06-28 22:36:18 +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
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
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 Merged revisions 74278 via svnmerge from 2009-08-13 08:36:43 +00:00
getcompiler.c
getcopyright.c
getcwd.c
getopt.c
getplatform.c
getversion.c
graminit.c Merged revisions 72924 via svnmerge from 2009-05-25 21:10:36 +00:00
import.c Merged revisions 75246 via svnmerge from 2009-10-04 20:35:30 +00:00
importdl.c
importdl.h
makeopcodetargets.py
marshal.c Merged revisions 75145 via svnmerge from 2009-09-29 19:24:38 +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
peephole.c Merged revisions 74126,74130-74131,74149,74155,74157,74180-74183,74398 via svnmerge from 2009-08-13 09:34:05 +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
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
symtable.c fix error handling of PyNumber_InPlaceOr #6000 2009-05-12 20:39:25 +00:00
sysmodule.c Merged revisions 74062 via svnmerge from 2009-08-13 11:51:54 +00:00
thread.c
thread_atheos.h
thread_cthread.h
thread_foobar.h
thread_lwp.h
thread_nt.h
thread_os2.h
thread_pth.h
thread_pthread.h
thread_sgi.h
thread_solaris.h
thread_wince.h
traceback.c