cpython/Modules
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
..
_ctypes Merged revisions 74972 via svnmerge from 2009-09-20 18:57:50 +00:00
_io Merged revisions 75007 via svnmerge from 2009-09-21 21:37:02 +00:00
_multiprocessing Revert last change, which was incorrect. 2009-07-04 15:16:38 +00:00
_sqlite Merge revision 71222 from trunk: #5615: make it possible to configure --without-threads again. 2009-04-05 11:47:34 +00:00
cjkcodecs add a replacement API for PyCObject, PyCapsule #5630 2009-05-05 22:31:58 +00:00
expat Backport of r77429. Not merged/blocked as svnmerge.py is not liking me right now. 2009-08-13 19:58:01 +00:00
zlib Remove RISCOS support 2007-08-16 14:35:24 +00:00
Setup.config.in Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875. 2008-05-25 13:05:15 +00:00
Setup.dist #3791: remove last traces of bsddb. 2009-06-04 09:30:30 +00:00
_bisectmodule.c merge from trunk 2008-10-11 00:49:57 +00:00
_codecsmodule.c Merged revisions 72404-72406 via svnmerge from 2009-05-06 14:41:26 +00:00
_collectionsmodule.c Issue 6637: defaultdict.copy() failed with an empty factory. 2009-08-04 19:16:39 +00:00
_csv.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
_curses_panel.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
_cursesmodule.c Merged revisions 74051-74052 via svnmerge from 2009-07-17 08:31:44 +00:00
_dbmmodule.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
_elementtree.c add a replacement API for PyCObject, PyCapsule #5630 2009-05-05 22:31:58 +00:00
_functoolsmodule.c Make some private functions static (thanks `make smelly`) 2009-05-24 21:25:49 +00:00
_gdbmmodule.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
_gestalt.c Rename PyUnicode_AsString -> _PyUnicode_AsString and 2008-08-07 18:54:33 +00:00
_hashopenssl.c remove old undocumented compat interfaces in hashlib and pwd #5881 2009-05-04 22:25:21 +00:00
_heapqmodule.c Remove 2.6 compatibility code: 2008-06-17 21:25:35 +00:00
_json.c Fix TODO: do the sort by just the key, not the key/value pair. 2009-05-27 11:19:02 +00:00
_localemodule.c Merged revisions 74843 via svnmerge from 2009-09-16 20:32:35 +00:00
_lsprof.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
_pickle.c Issue #6137: The pickle module now translates module names when loading 2009-06-04 20:32:06 +00:00
_randommodule.c Merged revisions 72344 via svnmerge from 2009-05-05 17:54:36 +00:00
_sre.c Issue #6561: '\d' in a regular expression should match only Unicode 2009-07-28 17:22:36 +00:00
_ssl.c Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from 2009-06-28 17:22:03 +00:00
_struct.c Merged revisions 73880 via svnmerge from 2009-07-07 10:21:03 +00:00
_testcapimodule.c Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
_threadmodule.c Merged revisions 74524,74556 via svnmerge from 2009-10-04 20:07:34 +00:00
_tkinter.c Merged revisions 71210 via svnmerge from 2009-04-10 22:19:09 +00:00
_weakref.c Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
addrinfo.h Cruft removal: 2006-12-28 04:47:50 +00:00
ar_beos Moved BeOS/ar-fake and BeOS/linkmodule to Modules/ar_beos and 2001-02-16 03:24:50 +00:00
arraymodule.c Use the proper autoconf macro for checking byte order. 2009-07-17 03:51:27 +00:00
atexitmodule.c Issue #4200: Changed the atexit module to store its state in its PyModuleDef atexitmodule. This fixes a bug with multiple subinterpeters. The bug was found by Graham Dumpletom during his work on a 3.0 port of mod_wsgi. The patch has been reviewed by Benjamin. 2008-10-30 21:34:02 +00:00
audioop.c Silence compiler warning. 2009-05-16 01:46:11 +00:00
binascii.c #4542: On Windows, binascii.crc32 still accepted str as binary input. 2008-12-05 01:40:43 +00:00
bz2module.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
cmathmodule.c Merged revisions 74303 via svnmerge from 2009-08-04 19:25:12 +00:00
config.c.in Merged revisions 66508,66510,66512-66513,66523-66526,66529-66530,66532,66535,66538,66544,66546 via svnmerge from 2008-09-22 22:10:59 +00:00
cryptmodule.c Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
datetimemodule.c add a replacement API for PyCObject, PyCapsule #5630 2009-05-05 22:31:58 +00:00
errnomodule.c Merged revisions 64214 via svnmerge from 2008-06-13 01:09:34 +00:00
fcntlmodule.c Merged revisions 72887 via svnmerge from 2009-05-24 15:46:13 +00:00
fpectlmodule.c - fix build failure in Modules/fpectlmodule.c (not built by default) 2008-11-26 17:18:22 +00:00
fpetestmodule.c Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
gc_weakref.txt SF 1055820: weakref callback vs gc vs threads 2004-10-30 23:09:22 +00:00
gcmodule.c Merged revisions 70546 via svnmerge from 2009-03-23 18:52:06 +00:00
getaddrinfo.c SF patch #1670209, Remove Py_PROTO from socket by Pete Shinners. 2007-02-27 19:06:23 +00:00
getbuildinfo.c Merged revisions 72871-72872 via svnmerge from 2009-05-23 19:36:27 +00:00
getnameinfo.c SF patch #1670209, Remove Py_PROTO from socket by Pete Shinners. 2007-02-27 19:06:23 +00:00
getpath.c This fixes issue5143 and includes a test. 2009-02-12 15:55:38 +00:00
grpmodule.c Merged revisions 73016 via svnmerge from 2009-05-29 16:01:34 +00:00
hashlib.h Fixes Issue #3745: Fix hashlib to always reject unicode and non 2009-02-12 07:35:29 +00:00
itertoolsmodule.c add sys prefix 2009-06-24 02:29:57 +00:00
ld_so_aix Merged revisions 72180 via svnmerge from 2009-05-01 21:18:27 +00:00
ld_so_beos Remove a hard coded Python version, and a now incorrect relative path. Closes 2001-02-16 03:27:35 +00:00
main.c Merged revisions 74051-74052 via svnmerge from 2009-07-17 08:31:44 +00:00
makesetup Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
makexp_aix - Changes donated by Elemental Security to make it work on AIX 5.3 2005-09-14 18:09:42 +00:00
mathmodule.c Merged revisions 75117 via svnmerge from 2009-09-28 19:21:11 +00:00
md5module.c Fixed memory leak on failure. This is related to issue5403 but won't crash on py3k. 2009-03-03 07:49:01 +00:00
mmapmodule.c Merged revisions 73677,73681 via svnmerge from 2009-06-29 14:54:12 +00:00
nismodule.c Merged revisions 73873 via svnmerge from 2009-07-07 06:51:26 +00:00
operator.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
ossaudiodev.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
parsermodule.c fix an ambiguity in the grammar from the implementation of extended unpacking 2009-09-27 02:43:28 +00:00
posixmodule.c Merged revisions 74841 via svnmerge from 2009-10-04 20:32:25 +00:00
pwdmodule.c Merged revisions 73016 via svnmerge from 2009-05-29 16:01:34 +00:00
pyexpat.c Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
python.c Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversion 2009-05-29 16:22:26 +00:00
readline.c Merged revisions 74970 via svnmerge from 2009-09-20 14:53:22 +00:00
resource.c Clean up some int/long detection remnants in resource module. 2009-05-08 21:28:46 +00:00
rotatingtree.c randombits(): Stop compiler warning about mixing 2006-02-15 03:01:30 +00:00
rotatingtree.h Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
selectmodule.c Merged revisions 73995,74002,74005,74007-74008,74011,74019-74023 via svnmerge from 2009-07-17 09:18:18 +00:00
sha1module.c Fixed memory leak on failure. This is related to issue5403 but won't crash on py3k. 2009-03-03 07:49:01 +00:00
sha256module.c remove old undocumented compat interfaces in hashlib and pwd #5881 2009-05-04 22:25:21 +00:00
sha512module.c remove old undocumented compat interfaces in hashlib and pwd #5881 2009-05-04 22:25:21 +00:00
signalmodule.c Merged revisions 74277,74321,74323,74326,74355,74465,74467,74488,74492,74513,74531,74549,74553,74625,74632,74643-74644,74647,74652,74666,74671,74727,74739 via svnmerge from 2009-09-11 22:24:02 +00:00
socketmodule.c 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
socketmodule.h fix typo in c++ ifdef 2009-08-12 18:11:03 +00:00
spwdmodule.c Issue #4859: Implement PEP 383 for pwd, spwd, and grp. 2009-05-29 15:23:17 +00:00
sre.h #2834: Change re module semantics, so that str and bytes mixing is forbidden, 2008-08-19 17:56:33 +00:00
sre_constants.h Implemented non-recursive SRE matching. 2003-10-17 22:13:16 +00:00
symtablemodule.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
syslogmodule.c Rename PyUnicode_AsString -> _PyUnicode_AsString and 2008-08-07 18:54:33 +00:00
termios.c Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
testcapi_long.h Merged revisions 69498 via svnmerge from 2009-02-10 16:13:25 +00:00
timemodule.c Merged revisions 75020 via svnmerge from 2009-09-22 19:15:35 +00:00
tkappinit.c Merged revisions 69473 via svnmerge from 2009-02-09 22:33:59 +00:00
tkinter.h Merged revisions 71210 via svnmerge from 2009-04-10 22:19:09 +00:00
unicodedata.c add a replacement API for PyCObject, PyCapsule #5630 2009-05-05 22:31:58 +00:00
unicodedata_db.h Merged revisions 72054 via svnmerge from 2009-04-27 22:31:40 +00:00
unicodename_db.h Merged revisions 66362 via svnmerge from 2008-09-10 14:08:48 +00:00
xxmodule.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
xxsubtype.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00
zipimport.c Fix a warning. 2009-05-17 08:20:45 +00:00
zlibmodule.c Issue #1717: rename tp_compare to tp_reserved. I'll change the 2009-02-02 20:36:42 +00:00