Re: /dev/one - why not /dev/repeat?

Riley Williams (rhw@bigfoot.com)
Sat, 26 Dec 1998 13:15:48 +0000 (GMT)


Hi all.

>>> There are several reasons, and I for one could have used it many
>>> times. The biggest reason of all is speed.

>> That's legitimate, if you have an application that really would be
>> substantially faster with a /dev/random. What is this app, and can
>> you show benchmarks?

> If it was limited to a *specific* application, it would not warrent
> being placed it the kernel.

> One use would be for low level file (device) acesss as mentioned in
> the 'wipe' thread. Compounding two pipes, to strip 4,000,000,000
> line feeds, from using the 'yes' | 'tr' is slow and sloppy. It also
> assumes both commands are actually available.

What's wrong with the following C code being run as a usermode
program?

#include <stdio.h>
void main(int argc,char *argv[]) {
unsigned int N;
while (1)
for (N=1; N<argc; N++)
vfprintf( "%s ", argv[N] );
}

Save that as wildecho.c and compile it, then do...

wildecho This is a test > /tmp/stupidity

...and watch your /tmp partition fill up with a single line file...

Best wishes from Riley.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/