cpython/Modules
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
..
_ctypes Merged revisions 69846 via svnmerge from 2009-07-02 15:37:21 +00:00
_multiprocessing Merged revisions 70953 via svnmerge from 2009-04-01 20:50:07 +00:00
_sqlite Merged revisions 69846 via svnmerge from 2009-07-02 15:37:21 +00:00
cjkcodecs Merged revisions 66766-66767,66771-66772,66774,66776,66783-66787,66790,66793,66797 via svnmerge from 2008-10-04 21:33:08 +00:00
expat Backport of r74429. Not merged/blocked as svnmerge.py is giving me an error and 2009-08-13 19:45:44 +00:00
zlib
Setup.config.in
Setup.dist - Modules/Setup.dist: Update _elementtree, add _bisect, datetime 2008-11-27 10:15:12 +00:00
_bisectmodule.c Merged revisions 66801,66803-66804,66813,66854-66856,66866,66870-66872,66874,66887,66903,66905,66911,66913,66927,66932,66938,66942,66962,66964,66973-66974,66977,66992,66998-66999,67002,67005,67007,67028,67040-67041,67044,67070,67089,67091,67101,67117-67119,67123-67124 via svnmerge from 2008-11-07 08:56:27 +00:00
_bsddb.c Bugfix for issue3885 and 'DB.verify()' crash. 2008-09-23 18:54:08 +00:00
_bytesio.c Victor Stinner's patches to check the return result of PyLong_Ssize_t 2008-09-30 02:11:07 +00:00
_codecsmodule.c Merged revisions 69578-69580,69901,69907,69994,70022-70023,70025-70026,70166,70273,70275,70342,70386-70387,70389-70390,70392-70393,70395,70397,70400,70418 via svnmerge 2009-04-05 21:48:06 +00:00
_collectionsmodule.c Issue 6637: defaultdict.copy() failed with an empty factory. 2009-08-04 18:49:26 +00:00
_csv.c Merge in release25-maint r60793: 2008-06-11 07:41:16 +00:00
_curses_panel.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
_cursesmodule.c Only include update_lines_cols() function when it's actually going to be used 2008-06-19 14:02:30 +00:00
_elementtree.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
_fileio.c Merged revisions 68835 via svnmerge from 2009-01-21 00:56:37 +00:00
_functoolsmodule.c Copy reduce() to _functools so to have functools.reduce() not raise a warning 2008-08-09 23:30:55 +00:00
_hashopenssl.c fix possible integer overflows in _hashopenssl #3886 2008-09-18 01:22:16 +00:00
_heapqmodule.c Optimize previous checkin for heapq. 2008-06-11 12:39:09 +00:00
_hotshot.c Merged revisions 67797 via svnmerge from 2008-12-15 22:16:00 +00:00
_json.c Merged revisions 66801,66803-66804,66813,66854-66856,66866,66870-66872,66874,66887,66903,66905,66911,66913,66927,66932,66938,66942,66962,66964,66973-66974,66977,66992,66998-66999,67002,67005,67007,67028,67040-67041,67044,67070,67089,67091,67101,67117-67119,67123-67124 via svnmerge from 2008-11-07 08:56:27 +00:00
_localemodule.c #3303: fix crash with invalid Py_DECREF in strcoll(). 2008-07-19 12:46:12 +00:00
_lsprof.c Fix a refleak introduced by r66677. 2008-09-30 17:46:03 +00:00
_randommodule.c Merged revisions 72344 via svnmerge from 2009-05-05 17:42:59 +00:00
_sre.c - Issue #3629: Fix sre "bytecode" validator for an end case. 2008-09-10 14:27:00 +00:00
_ssl.c Fix signed/unsigned mismatch. 2009-01-26 16:55:41 +00:00
_struct.c Merged revisions 73880 via svnmerge from 2009-07-07 10:19:18 +00:00
_testcapimodule.c Merged revisions 68099 via svnmerge from 2008-12-31 05:54:10 +00:00
_tkinter.c Merged revisions 70218-70219 via svnmerge from 2009-03-07 01:51:48 +00:00
_weakref.c #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
addrinfo.h
almodule.c Issue #2620: Overflow checking when allocating or reallocating memory 2008-07-22 04:46:32 +00:00
ar_beos
arraymodule.c Merged revisions 69846 via svnmerge from 2009-07-02 15:37:21 +00:00
audioop.c Issue 3306. Better control for a lenght in findmax() function. 2008-07-07 17:02:59 +00:00
binascii.c Merge in release25-maint r60793: 2008-06-11 07:41:16 +00:00
bsddb.h bsddb4.7.3pre9 renamed to 4.7.3 2008-09-28 23:24:19 +00:00
bsddbmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
bz2module.c Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple, 2008-08-12 14:49:50 +00:00
cPickle.c Merged revisions 74189 via svnmerge from 2009-07-23 22:31:47 +00:00
cStringIO.c Merge in release25-maint r60793: 2008-06-11 07:41:16 +00:00
cdmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
cgen.py Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for removal in 3.0. 2008-05-15 02:33:55 +00:00
cgensupport.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
cgensupport.h
clmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
cmathmodule.c Merged revisions 74303 via svnmerge from 2009-08-04 19:24:16 +00:00
config.c.in tabify 2008-09-18 23:20:28 +00:00
cryptmodule.c
cstubs
datetimemodule.c Merge in release25-maint r60793: 2008-06-11 07:41:16 +00:00
dbmmodule.c issue4483: dbm build failures on systems with gdbm_compat lib. 2008-12-06 17:39:54 +00:00
dlmodule.c Issue #3313: Contrary to the man page, a failed dlopen() call does not 2008-07-15 19:39:38 +00:00
errnomodule.c Restore support for Microsoft VC6 compiler. 2008-06-13 00:42:22 +00:00
fcntlmodule.c Merged revisions 72887 via svnmerge from 2009-05-24 15:41:43 +00:00
flmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
fmmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
fpectlmodule.c
fpetestmodule.c
future_builtins.c Add future_builtins.ascii(). 2008-06-11 18:55:38 +00:00
gc_weakref.txt
gcmodule.c Merged revisions 67654,67676-67677,67681,67692,67725,67746,67748,67761,67784-67785,67787-67788,67802,67832,67848-67849,67859,67862-67864,67880,67882,67885,67889-67892,67895 via svnmerge from 2008-12-21 17:01:26 +00:00
gdbmmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
getaddrinfo.c
getbuildinfo.c Merged revisions 72871-72872 via svnmerge from 2009-05-23 19:35:33 +00:00
getnameinfo.c
getpath.c
glmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
grpmodule.c Merged revisions 73016 via svnmerge from 2009-05-29 16:00:23 +00:00
imageop.c Merged revisions 67266 via svnmerge from 2008-11-18 22:27:00 +00:00
imgfile.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
itertoolsmodule.c - Issue 4816: itertools.combinations() and itertools.product were raising 2009-01-08 05:20:19 +00:00
ld_so_aix Merged revisions 72180 via svnmerge from 2009-05-01 21:24:56 +00:00
ld_so_beos
linuxaudiodev.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
main.c Py3k warnings now automatically include -Qwarn for division. 2009-02-18 23:12:48 +00:00
makesetup Patch #786737: Allow building in a tree of symlinks pointing to 2007-09-05 11:47:34 +00:00
makexp_aix
mathmodule.c Merged revisions 67654,67676-67677,67681,67692,67725,67746,67748,67761,67784-67785,67787-67788,67802,67832,67848-67849,67859,67862-67864,67880,67882,67885,67889-67892,67895 via svnmerge from 2008-12-21 17:01:26 +00:00
md5.c Merge in release25-maint r60793: 2008-06-11 07:41:16 +00:00
md5.h
md5module.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
mmapmodule.c Merged revisions 73677,73681 via svnmerge from 2009-06-29 14:37:28 +00:00
nismodule.c Merged revisions 73873 via svnmerge from 2009-07-07 06:52:04 +00:00
operator.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
ossaudiodev.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
parsermodule.c Merged revisions 67571,67574-67576,67579-67581,67583,67591,67597,67608,67631 via svnmerge from 2008-12-07 14:47:12 +00:00
posixmodule.c Merged revisions 74841 via svnmerge from 2009-09-16 20:06:36 +00:00
puremodule.c Deprecate the pure module for 3.0. 2008-05-09 22:51:58 +00:00
pwdmodule.c Merged revisions 74727 via svnmerge from 2009-09-09 11:46:13 +00:00
pyexpat.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
python.c
readline.c Merged revisions 67098 via svnmerge from 2008-11-04 20:43:31 +00:00
resource.c Merged revisions 72479 via svnmerge from 2009-05-08 20:59:57 +00:00
rotatingtree.c
rotatingtree.h
selectmodule.c #3852: fix some select.kqueue and kevent docs. 2008-09-21 07:14:44 +00:00
sgimodule.c
sha256module.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
sha512module.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
shamodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
signalmodule.c Merged revisions 66748 via svnmerge from 2008-10-02 19:49:47 +00:00
socketmodule.c Merged revisions 70849 via svnmerge from 2009-03-31 18:20:48 +00:00
socketmodule.h on windows, r64214 broke compilation with some recent SDKs, 2008-06-14 08:36:07 +00:00
spwdmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
sre.h
sre_constants.h
stropmodule.c Security patches from Apple: prevent int overflow when allocating memory 2008-07-31 17:17:14 +00:00
sunaudiodev.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
svmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
symtablemodule.c get the symtable module back in working order 2008-08-17 17:13:26 +00:00
syslogmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
termios.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00
testcapi_long.h
threadmodule.c #Issue3088 in-progress: Race condition with instances of classes derived from threading.local: 2008-06-30 22:42:40 +00:00
timemodule.c Issue 3289. Removed two lines that ended doing nothing. 2008-07-05 19:19:50 +00:00
timing.h Remove the advertising clause from the BSD license in timing.h. 2008-04-01 23:57:36 +00:00
timingmodule.c Deprecate the timing module for removal in Python 3.0. 2008-05-12 03:47:47 +00:00
tkappinit.c Merged revisions 66748 via svnmerge from 2008-10-02 19:49:47 +00:00
unicodedata.c Issue #3811: The Unicode database was updated to 5.1. 2008-09-10 13:38:12 +00:00
unicodedata_db.h Issue #3811: The Unicode database was updated to 5.1. 2008-09-10 13:38:12 +00:00
unicodename_db.h Issue #3811: The Unicode database was updated to 5.1. 2008-09-10 13:38:12 +00:00
xxmodule.c #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
xxsubtype.c
yuv.h
yuvconvert.c
zipimport.c Merged revisions 67750-67751 via svnmerge from 2008-12-14 11:30:16 +00:00
zlibmodule.c This reverts r63675 based on the discussion in this thread: 2008-06-09 04:58:54 +00:00