Christian Heimes added the comment:

Oh heck, signal, threads and fork really don't mix. :(
Under which condition can a non-async safe function cause trouble? Is it just 
fork() inside a signal handler or can an incoming signal during fork() also 
cause havoc?

The OpenSSL PRNG is only buggy when used in a forking application where the 
master process initializes the PRNG but never uses it. All child processes 
inherit the same state. OpenSSL tries to work around the problem by feeding the 
PID into the PRNG state. But as soon as PIDs get recycled, subsequent child 
processes get the same random numbers.

Antoine's proposal works, too, because it perturbs the master's PRNG state 
regularly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18747>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to