[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231598714.11642.53.camel@quest>
Date: Sat, 10 Jan 2009 14:45:14 +0000
From: Scott James Remnant <scott@...onical.com>
To: Roland McGrath <roland@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Casey Dahlin <cdahlin@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Randy Dunlap <randy.dunlap@...cle.com>,
Oleg Nesterov <oleg@...hat.com>,
Davide Libenzi <davidel@...ilserver.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RESEND][RFC PATCH v2] waitfd
On Wed, 2009-01-07 at 12:53 -0800, Roland McGrath wrote:
> New syscall should have gone to linux-api, I think.
>
> Do we really need another one for this? How about using signalfd plus
> setting the child's exit_signal to a queuing (SIGRTMIN+n) signal instead of
> SIGCHLD? It's slightly more magical for the userland process to know to do
> that (fork -> clone SIGRTMIN). But compared to adding a syscall we don't
> really have to add, maybe better.
>
This wouldn't help the init daemon case:
- the exit_signal is set on the child, not on the parent.
While the init daemon could clone() every new process and set
exit_signal, this would not be set for processes reparented to init.
Even if we had a new syscall to change the exit_signal of a given
process, *and* had the init reparent notification patch, this still
wouldn't be sufficient; you'd have a race condition between the time
you were notified of the reparent, and the time you set exit_signal,
in which the child could die.
Since exit_signal is always reset to SIGCHLD before reparenting, this
could be done by resetting it to a different signal; but at this point
we're getting into a rather twisty method full of traps.
- exit_signal is reset to SIGCHLD on exec().
Pretty much a plan-killer ;)
Scott
--
Scott James Remnant
scott@...onical.com
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists