[Python-Dev] issue 6721 "Locks in python standard library should be sanitized on fork"
Antoine Pitrou
solipsis at pitrou.net
Tue Aug 23 20:51:47 CEST 2011
On Tue, 23 Aug 2011 20:43:25 +0200
Charles-François Natali <cf.natali at gmail.com> wrote:
> > Please consider this invitation to stick your head into an interesting
> > problem:
> > http://bugs.python.org/issue6721
>
> Just for the record, I'm now in favor of the atfork mechanism. It
> won't solve the problem for I/O locks, but it'll at least make room
> for a clean and cross-library way to setup atfork handlers. I just
> skimmed over it, but it seemed Gregory's atfork module could be a good
> starting point.
Well, I would consider the I/O locks the most glaring problem. Right
now, your program can freeze if you happen to do a fork() while e.g.
the stderr lock is taken by another thread (which is quite common when
debugging).
Regards
Antoine.
More information about the Python-Dev
mailing list