[New-bugs-announce] [issue10824] urandom should not block

Michal Čihař report at bugs.python.org
Tue Jan 4 14:42:44 CET 2011

New submission from Michal Čihař <michal at cihar.com>:

Currently if /dev/urandom does not provide any data, unradom() call is just stuck infinitely waiting for data.

I actually faced this issue when /dev/urandom was empty regular file (due to bug in pbuilder, but I don't think it matters how it did happen) and urandom() call just hang. I think it would be much saner in such case to throw an error and let user know that something it wrong than waiting infinitely.

components: Library (Lib)
messages: 125316
nosy: nijel
priority: normal
severity: normal
status: open
title: urandom should not block
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list