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

Re: Bug#654160: RFH: python-crypto: FTBFS on hurd-i386: AssertionError: /dev/urandom produced truncated output (requested 1024, got 600)

On 01/17/2012 07:55 PM, Samuel Thibault wrote:
> Sebastian Ramacher, le Tue 17 Jan 2012 19:51:10 +0100, a écrit :
>> Do you have a pointer to the relevant part of POSIX, by any chance? I couldn't
>> find anything. Are /dev/random and /dev/urandom even part of POSIX?
> They are not, but 
> “The value returned may be less than nbyte if the number of bytes left
> in the file is less than nbyte, if the read() request was interrupted by
> a signal, or if the file is a pipe or FIFO or special file and has fewer
> than nbyte bytes immediately available for reading.”
> The latter is exactly our case.

I'm sorry for the confusion. I thought the POSIX comment was related to
/dev/urandom. But yes, read can return less bytes than requested. I'm currently
investigating how Python's read behaves in all these situations.

Thanks for your help.

Kind regards,
Sebastian Ramacher

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: