Re: short read from /dev/urandom

From: Ulrich Drepper
Date: Sat Jan 15 2005 - 23:02:30 EST


Matt Mackall wrote:
_Neither_ case mentions signals and the "and will return as many bytes
as requested" is clearly just a restatement of "does not have this
limit". Whoever copied this comment to the manpage was a bit sloppy
and dropped the first clause rather than the second:

It still means the documented API says there are no short reads.


So anyone doing a read() can expect a short read regardless of the fd
and is quite clear that reads can be interrupted by signals. "It is
not an error". Ever.

Of course are signal interruptions wrong if the signal uses SA_RESTART.

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature