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



On Wed, Apr 05, 2017 at 04:38:32PM -0400, Christos Zoulas wrote:
>     Can the other threads harm the child or the parent while it is vfork()ing?
> 
> I can't think of a way.

Race conditions in mutex code. Keep in mind that the park/unpark events
are per-process.

I fully support the proposal to block all threads in the parent. If you
want to create child processes from multi-threaded programs and care at
all about performance, use posix_spawn. How it is implemented is an
implementation detail and independent of vfork.

Joerg


Home | Main Index | Thread Index | Old Index