Re: short read from /dev/urandom

From: David Wagner
Date: Fri Jan 14 2005 - 00:59:24 EST


Ulrich Drepper wrote:
>The /dev/urandom device is advertised as always returning the requested
>number of bytes.

True. Arguably, the solution is to fix the documentation.
Why not make /dev/urandom like every other kind of fd in the world,
and make no promises about whether a read() will always return as
many bytes as requested? Is there any reason /dev/urandom fds special?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/