classification
Title: Need pthread_atfork-like functionality in CPython
Type: enhancement Stage: resolved
Components: Interpreter Core Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add an 'atfork' module
View: 16500
Assigned To: twouters Nosy List: gregory.p.smith, jcea, twouters
Priority: low Keywords:

Created on 2009-09-16 20:03 by twouters, last changed 2013-08-21 18:44 by neologix. This issue is now closed.

Messages (2)
msg92715 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2009-09-16 20:03
In order to properly handle multiple threads and fork()-calls from C code 
(rather than os.fork()), Python should provide pthread_atfork()-like 
functionality: a function to call before a fork, to acquire any locks 
that need to be acquired, and a pair of functions to call after the fork, 
in the parent and the child, to release or re-allocate locks. The 
acquisitions should be re-entrant and should not require an existing 
threadstate. Also see <http://bugs.python.org/issue1590864>.
msg92765 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2009-09-17 14:24
For reference, this is related to http://bugs.python.org/issue6721 but 
deals with the C API side of things for an atfork mechanism to be used by 
extension modules.
History
Date User Action Args
2013-08-21 18:44:31neologixsetstatus: open -> closed
resolution: duplicate
superseder: Add an 'atfork' module
stage: needs patch -> resolved
2012-11-24 00:36:01jceasetnosy: + jcea
2009-09-17 14:24:10gregory.p.smithsetnosy: + gregory.p.smith
messages: + msg92765
2009-09-16 20:03:12twouterscreate