Is fork() hook ever possible?

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Sep 16 20:11:21 UTC 2008


In message <20080916193347.GA43665 at nagual.pp.ru>, Andrey Chernov writes:

>That was my original idea - to set the flag variable (not a new inteface) 
>in the fork() wrapper which arc4random() will check later. I'll think 
>about, what is better: getpid() speedup looks like more general solution 
>for all similar cases while the flag will be for arc4random() only.

Not to be devils advocate here, but isn't the process pid about the
worst seed you can use for a random generator, considering that it
is publically visible ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list