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 21:24:06 +0000
Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> Race conditions in mutex code. Keep in mind that the park/unpark events
> are per-process.
As I mentioned in my oroginal post, pthread_mutex_*lock() and such are NOT in
the async-signal-safe function set, therefore vfork() children cannot safely
call them, and if they don't call them, how can they cause other threads in the
parent any problems?
(An OS could certainly make pthread functions work in the vfork() child,
provided that neither child nor parent exit due signals, say, while holding a
lock. However, it is not necessary to do this as pthread functions are already
not async-signal-safe.)
Nico
--
Home |
Main Index |
Thread Index |
Old Index