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 christian.heimes
Recipients christian.heimes, hynek, tarek, vstinner
Date 2013-08-16.15:21:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have seen complains from e.g. Tarek that os.urandom() fails under high load:

The problem is caused by file descriptor limits. os.urandom() opens /dev/urandom for every call. How about os.urandom() uses a persistent file descriptor? That should eliminate the error. It may alsos speed up os.urandom() because a persistent FD gets rid of open() and close() syscalls.

* open /dev/urandom on first call of os.urandom() and store the fd in a static var
* invalidate, close fd on read() -> EINVAL; open /dev/urandom again
* close fd when interpreter shuts down
Date User Action Args
2013-08-16 15:21:38christian.heimessetrecipients: + christian.heimes, vstinner, tarek, hynek
2013-08-16 15:21:38christian.heimessetmessageid: <>
2013-08-16 15:21:38christian.heimeslinkissue18756 messages
2013-08-16 15:21:37christian.heimescreate