lkml.org 
[lkml]   [2008]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] waitfd: file descriptor to wait on child processes
From
Date
On Fri, 2008-12-12 at 20:29 -0800, Davide Libenzi wrote:

> And how about this?
>
> sfd = signalfd(SIGCHLD);
>
> for (;;) {
> poll(sfd, POLLIN);
> while ((pid = waitpid(0, &status, WNOHANG)) != -1)
> process_child_death(pid);
> }
>
At this point, why have signalfd()'s read() return siginfo_t at all?

You have to discard the entire information since it's only ever the
first signal that matched, all subsequent ones are thrown away.

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-12-13 09:45    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site