[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RESEND][RFC PATCH v2] waitfd
On 01/07, Ulrich Drepper wrote:
> On Wed, Jan 7, 2009 at 12:53 PM, Roland McGrath <> wrote:
> > 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.
> Since waitfd shouldn't consume the child termination notification
> waitfd should be more widely usable than the wait*() interfaces.

yes, it doesn't eat the notification (SIGCHLD), but it reaps a
zombie, clears ->exit_code TASK_STOPPED/TASK_TRACED tasks, clears

> I.e., it's not necessary to restrict the use to parents. Any process
> with the same UID should be allowed to call waitfd. This would allow
> some new user cases.

I don't see how it is possible to implement this...

The parent can sleep on ->wait_chldexit and it will be notified, but
how can we wait for the unrelated process with the same UID ?

Even if sys_waitfd() uses P_PID, we can't use task->parent->signal->wait_chldexit,
task->parent can exit before task exits.

Or I misunderstood you?


 \ /
  Last update: 2009-01-08 15:37    [W:0.199 / U:2.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site