[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUnet News: vfork and the signal race

From: Samuel Thibault
Subject: Re: GNUnet News: vfork and the signal race
Date: Sat, 26 Nov 2011 15:14:11 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Richard Braun, le Sat 26 Nov 2011 15:12:50 +0100, a écrit :
> 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.

Yes, which is sufficient for what you said.

> > 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]