Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Sep 2008 15:38:16 +0100
From:      Bob Bishop <rb@gid.co.uk>
To:        Andrey Chernov <ache@nagual.pp.ru>
Cc:        current@freebsd.org
Subject:   Re: Is fork() hook ever possible?
Message-ID:  <BBB443F5-042C-444E-A2F4-592B66FF2003@gid.co.uk>
In-Reply-To: <20080916140319.GA34447@nagual.pp.ru>
References:  <20080916140319.GA34447@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 16 Sep 2008, at 15:03, Andrey Chernov wrote:

> I need some sort of fork() hook to detect that pid is changed to re- 
> stir
> ar4random() after that (in the child), simple flag variable with
> child's pid is needed.
>
> Currently OpenBSD does almost that checking getpid() every time
> arc4random() called, but it is very slow way to use getpid() syscall
> repeatedly, about 12-15 times slower than just arc4random() without
> getpid().
>
> Any ideas?

How about something hacky using mmap()/minherit()?

> -- 
> http://ache.pp.ru/
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org 
> "
>

--
Bob Bishop
rb@gid.co.uk







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BBB443F5-042C-444E-A2F4-592B66FF2003>