Re: not fork-safe if pids wrap

2013-08-23 Thread Dr. Stephen Henson
On Thu, Aug 22, 2013, Bodo Moeller wrote: > > > (So we probably should use the current time in addition to the PID to > > get a > > > general solution to the PID wrap-around problem even on systems where > > > actual independent reseeding isn't possible.) > > > > The FIPS PRNG uses a combination o

Re: not fork-safe if pids wrap

2013-08-22 Thread Bodo Moeller
> > (So we probably should use the current time in addition to the PID to > get a > > general solution to the PID wrap-around problem even on systems where > > actual independent reseeding isn't possible.) > > The FIPS PRNG uses a combination of PID, a counter and a form of system > timer > for the

Re: not fork-safe if pids wrap

2013-08-22 Thread Dr. Stephen Henson
On Thu, Aug 22, 2013, Bodo Moeller wrote: > On Thu, Aug 22, 2013 at 4:50 AM, Bodo Moeller wrote: > > > > > Most other libraries I've seen handle this by saving the pid in a static > >> variable, and then comparing the current pid to it. This has the advantage > >> of not needing pthreads, and a

Re: not fork-safe if pids wrap

2013-08-22 Thread Cristian Rodríguez
El jue 22 ago 2013 10:37:12 CLT, Bodo Moeller escribió: > (So we probably should use the current time in addition to the PID to > get a general solution to the PID wrap-around problem even on systems > where actual independent reseeding isn't possible.) Or the processor time stamp counter (RDTSC

Re: not fork-safe if pids wrap

2013-08-22 Thread Bodo Moeller
On Thu, Aug 22, 2013 at 4:50 AM, Bodo Moeller wrote: > > Most other libraries I've seen handle this by saving the pid in a static >> variable, and then comparing the current pid to it. This has the advantage >> of not needing pthreads, and also of only adding the entropy to the child >> if it is

Re: not fork-safe if pids wrap

2013-08-22 Thread Bodo Moeller
> Most other libraries I've seen handle this by saving the pid in a static > variable, and then comparing the current pid to it. This has the advantage > of not needing pthreads, and also of only adding the entropy to the child > if it is actually needed (i. e. it doesn't exec after fork). > We m