[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python 2.4: os.urandom() hangs if /dev/random, /dev/urandom are not

From: Michael Banck
Subject: Re: python 2.4: os.urandom() hangs if /dev/random, /dev/urandom are not reconnected to a translator
Date: Sat, 27 Jan 2007 21:28:39 +0100
User-agent: Mutt/1.5.11+cvs20060403

On Sat, Jan 27, 2007 at 06:16:22PM +0000, massimo s. wrote:
> I thought that for os.urandom():
> - a timeout could be useful on any platform without a reliable random
> device (I don't think Hurd is alone in this). I'll ask to the python
> mailing list.

/dev/urandom does not provide reliable random data anyway; it's just a
problem if no data can be provided at all I guess.  An appropriate error
message should be raised in that case after some timeout maybe.

For /dev/random, things are different, it should block until reliable
random data is again available from the entropy pool, I think.

> - hurd-specifically, the module could maybe also check if a translator
> is attached to /dev/urandom and at least spit a warning if there is none.

A work-around on the Hurd is to copy a random binary (like /bin/bash) to

I don't think python should worry about Hurd implementation details


reply via email to

[Prev in Thread] Current Thread [Next in Thread]