Re: /dev/random vs. /dev/urandom

Andries Brouwer
2005-01-07T21:43:23Z

On Fri, Jan 07, 2005 at 02:05:36PM -0500, Ron Peterson wrote:

> When I compile and run the code below, the string of octal characters
> generated by reading /dev/random contains long strings of zeroes.

But it is your program that invents the zeros, they are not returned
by /dev/random. The bug in your program is failing to check the
return value of read().