Messages in this thread | | | Date | Sun, 16 Jan 2005 14:23:40 +0100 | From | Andries Brouwer <> | Subject | Re: short read from /dev/urandom |
| |
On Sat, Jan 15, 2005 at 07:58:23PM -0800, Ulrich Drepper wrote:
> 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.
No. It says that /dev/urandom "contains" an unlimited amount of bits - you can read as many bits from there as you want, while /dev/random "contains" a limited amount of information - you can exhaust it.
That is information about the device. There is no suggestion at all about some special property that would guarantee that the normal read() system call has special behavior in connection with /dev/urandom.
There is no special documented API. Now that this misunderstanding occurred I suppose a clarifying sentence will be added. Nothing special with /dev/urandom.
Applications that make special assumptions are broken.
Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |