[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUnet News: vfork and the signal race
From: |
Richard Braun |
Subject: |
Re: GNUnet News: vfork and the signal race |
Date: |
Sat, 26 Nov 2011 15:12:50 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Sat, Nov 26, 2011 at 11:35:29AM +0100, Samuel Thibault wrote:
> > (Naturally, the result would be non-portable for systems where fork==vfork,
> > but then maybe implementing vfork as fork is the bug? ;-))
>
> It's what the norm says.
I think you meant the norm explicitely says vfork can be implemented as
fork.
> Now, about the problem you mention on the webpage, isn't it possible to
> use a semaphore to tell the hypervisor when the "just-forked" process
> has changed its signal handler for something that is fine with SIGTERM?
> Or use a signal back (IIRC Xorg does this). That would implement the
> "make father wait" in a portable way.
How about blocking signals until the child is actually able to handle
SIGTERM correctly ? POSIX clearly states signal masks are inherited on
forks. AIUI, this case doesn't need the parent to wait, only to avoid
the kill/exec race.
--
Richard Braun
- Re: GNUnet News: vfork and the signal race, Thomas Schwinge, 2011/11/25
- Re: GNUnet News: vfork and the signal race, Thomas Bushnell, BSG, 2011/11/25
- Re: GNUnet News: vfork and the signal race, Christian Grothoff, 2011/11/26
- Re: GNUnet News: vfork and the signal race, Thomas Bushnell, BSG, 2011/11/25
- Re: GNUnet News: vfork and the signal race, Thomas Bushnell, BSG, 2011/11/25
- Re: GNUnet News: vfork and the signal race, Christian Grothoff, 2011/11/26
- Re: GNUnet News: vfork and the signal race, Thomas Schwinge, 2011/11/26
- Re: GNUnet News: vfork and the signal race, Samuel Thibault, 2011/11/26
- Re: GNUnet News: vfork and the signal race,
Richard Braun <=
- Re: GNUnet News: vfork and the signal race, Samuel Thibault, 2011/11/26
- Re: GNUnet News: vfork and the signal race, Samuel Thibault, 2011/11/26