Project/Real_code/book/ch12/ch12-devrandom.c
unsigned long myrandom(void)
{
	static int fd = -1;
	unsigned long data;

	if (fd == -1)
		fd = open("/dev/urandom", O_RDONLY);

	if (fd == -1 || read(fd, & data, sizeof data) <= 0)
		return random();	/* fall back */

	return data;
}
/* myrandom --- return data from /dev/urandom as unsigned long */
return data from /dev/urandom as unsigned long
return data from / dev / urandom as unsigned long
unsigned long myrandom(void)
{
	static int fd = -1;
	unsigned long data;
	if (fd == -1)
		fd = open("/dev/urandom", O_RDONLY);
	if (fd == -1 || read(fd, & data, sizeof data) <= 0)
		return random();	
	return data;
}
unsigned long myrandom ( void ) { static int fd = -1 ; unsigned long data ; if ( fd == -1 ) fd = open ( " " , O_RDONLY ) ; if ( fd == -1 || read ( fd , & data , sizeof data ) <= 0 ) return random ( ) ; return data ; }
myrandom --- return data from /dev/urandom as unsigned long
myrandom --- return data from / dev / urandom as unsigned long
/* fall back */