NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/49017: vfork does not suspend all threads
The following reply was made to PR kern/49017; it has been noted by GNATS.
From: Nico Williams <Nico.Williams%twosigma.com@localhost>
To: <gnats-bugs%netbsd.org@localhost>
Cc:
Subject: Re: kern/49017: vfork does not suspend all threads
Date: Wed, 5 Apr 2017 20:57:03 +0000
Kamil Rytarowski also wrote:
> I thing you might be interested in designing something like _lwp_vfork().=
Actually, I am interested in something like that:
pid_t avfork(int (*)(void *), void *);
It would have similar constraints for the child as vfork(). E.g., no allocator
calls, etc.
avfork()'s main benefit over vfork() is that it wouldn't have to stop even the
thread that called it in the parent.
avfork() can even be implemented in terms of threads and vfork()... if only
vfork() doesn't stop all threads in the parent. See:
https://gist.github.com/nicowilliams/a8a07b0fc75df05f684c23c18d7db234
for a partial implementation and lots more about vfork() in general.
Nico
--
Home |
Main Index |
Thread Index |
Old Index