This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients amaury.forgeotdarc, asvetlov, christian.heimes, grahamd, gregory.p.smith, jcea, pitrou, sbt, twouters, vstinner
Date 2013-01-12.23:37:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"The tempfile module has a specialized RNG that re-initialized the RNG after fork() by comparing os.getpid() to an instance variable every time the RNG is accessed. The check can be replaced with an afterfork callback."

By the way, OpenSSL expects that its PRNG is reseed somehow (call RNG_add) after a fork. I wrote a patch for OpenSSL, but I don't remember if I sent it to OpenSSL.

Reseeding tempfile PRNG is useless (but spend CPU/memory/hang until we have enough entropy?) if the tempfile is not used after fork. I like the current approach.


I'm not saying that a new atfork module would not help, just that the specific case of tempfile should be discussed :-) I like the idea of a generic module to call code after fork.
Date User Action Args
2013-01-12 23:37:35vstinnersetrecipients: + vstinner, twouters, gregory.p.smith, jcea, amaury.forgeotdarc, pitrou, christian.heimes, grahamd, asvetlov, sbt
2013-01-12 23:37:35vstinnersetmessageid: <>
2013-01-12 23:37:35vstinnerlinkissue16500 messages
2013-01-12 23:37:34vstinnercreate