Richard Oudkerk added the comment:

pthread_atfork() allows the registering of three types of callbacks:

1) prepare callbacks which are called before the fork,
2) parent callbacks which are called in the parent after the fork
3) child callbacks which are called in the child after the fork.

I think all three should be supported.

I also think that a recursive "fork lock" should be introduced which is held 
during the fork.  This can be acquired around critical sections during which 
forks must not occur.

This is more or less a duplicate of #6923.  See also #6721.


Python tracker <>
Python-bugs-list mailing list

Reply via email to