Fix import_lock+fork() deadlock. - Code Review (original) (raw)
Issue 96125: Fix import_lock+fork() deadlock. (Closed)
Can't Edit Can't Publish+Mail Start Review Created: 15 years, 9 months ago by Thomas Wouters (gmail) Modified: 15 years, 2 months ago Reviewers: gregory.p.smith Base URL: http://svn.python.org/view/\*checkout\*/python/branches/release26-maint/ Visibility: Public. |
Patch Set 1# Patch Set 2 : Added documentation.# Patch Set 3 : Add error checks, revert AIX change.# Total comments: 2 Patch Set 4 : Doc glitch fix.# Created: 15 years, 8 months ago Download[raw] [tar.bz2] Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -16 lines) Patch M Doc/c-api/init.rst View 2 3 1 chunk +16 lines, -0 lines 0 comments Download M Include/import.h View 1 1 chunk +8 lines, -0 lines 0 comments Download M Lib/test/test_fork1.py View 1 2 chunks +41 lines, -0 lines 0 comments Download M Modules/posixmodule.c View 1 2 3 chunks +31 lines, -3 lines 0 comments Download M Python/import.c View 1 2 6 chunks +8 lines, -13 lines 0 comments Download Messages Total messages: 4 Expand All Messages | Collapse All Messages gregory.p.smith LGTM 15 years, 9 months ago (2009-07-25 17:12:56 UTC)#1 LGTM Sign in to reply to this message. gregory.p.smith http://codereview.appspot.com/96125/diff/2008/3003 File Doc/c-api/init.rst (right): http://codereview.appspot.com/96125/diff/2008/3003#newcode534 Line 534: of Python's internal locks behind held by a ... 15 years, 8 months ago (2009-09-09 18:24:56 UTC)#2 http://codereview.appspot.com/96125/diff/2008/3003 File Doc/c-api/init.rst (right): http://codereview.appspot.com/96125/diff/2008/3003#newcode534 Line 534: of Python's internal locks behind held by a thread that is defunct after the calling fork() from C code isn't a problem by itself. It is only a problem if the child process ever attempts to return up its stack back to the Python interpreter. If it stays in C code doing its own stuff it is perfectly safe. (for example: os.system) Sign in to reply to this message. Thomas Wouters (gmail) http://codereview.appspot.com/96125/diff/2008/3003 File Doc/c-api/init.rst (right): http://codereview.appspot.com/96125/diff/2008/3003#newcode534 Line 534: of Python's internal locks behind held by a ... 15 years, 8 months ago (2009-09-09 18:37:28 UTC)#3 http://codereview.appspot.com/96125/diff/2008/3003 File Doc/c-api/init.rst (right): http://codereview.appspot.com/96125/diff/2008/3003#newcode534 Line 534: of Python's internal locks behind held by a thread that is defunct after the On 2009/09/09 18:24:56, gregory.p.smith wrote: > calling fork() from C code isn't a problem by itself. > > It is only a problem if the child process ever attempts to return up its stack > back to the Python interpreter. If it stays in C code doing its own stuff it is > perfectly safe. (for example: os.system) That's why it says 'may' :-) But point taken, clarification added. Sign in to reply to this message. gregory.p.smith LGTM 15 years, 8 months ago (2009-09-09 18:43:07 UTC)#4 LGTM Sign in to reply to this message. Expand All Messages |
Collapse All Messages |
Issue 96125: Fix import_lock+fork() deadlock. (Closed)
Created 15 years, 9 months ago by Thomas Wouters (gmail)
Modified 15 years, 2 months ago
Reviewers: gregory.p.smith
Base URL: http://svn.python.org/view/\*checkout\*/python/branches/release26-maint/
Comments: 2