NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/25367: arc4random state is shared across forks
The following reply was made to PR lib/25367; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/25367: arc4random state is shared across forks
Date: Wed, 22 Aug 2012 04:06:06 +0000
On Sun, Aug 19, 2012 at 04:25:02PM +0000, David Laight wrote:
> Optimising getpid() (or having an optimised getpid() function) is one
> possibility. All that requires is for libc to zero the cached pid
> value in the child of fork().
> Although vfork() and others? may need special consideration.
I think it's ok for a vfork child to share the arc4random state with
its parent, because it'll be shared read/write rather than copied.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index