public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Scott James Remnant <scott@netsplit.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Casey Dahlin <cdahlin@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] waitfd: file descriptor to wait on child processes
Date: Sat, 13 Dec 2008 00:43:09 -0800	[thread overview]
Message-ID: <1229157789.6128.0.camel@warcraft> (raw)
In-Reply-To: <alpine.DEB.1.10.0812122025180.27751@alien.or.mcafeemobile.com>

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

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?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-12-13  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 17:00 [RFC PATCH] waitfd: file descriptor to wait on child processes Casey Dahlin
2008-12-09 17:05 ` Alan Cox
2008-12-09 17:12   ` Scott James Remnant
2008-12-09 18:46   ` Casey Dahlin
2008-12-09 19:04     ` Alan Cox
2008-12-09 19:21       ` Casey Dahlin
2008-12-09 19:41 ` Davide Libenzi
2008-12-09 20:09   ` Casey Dahlin
2008-12-12 23:28   ` Scott James Remnant
2008-12-13  4:29     ` Davide Libenzi
2008-12-13  8:43       ` Scott James Remnant [this message]
2008-12-13 18:39         ` Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1229157789.6128.0.camel@warcraft \
    --to=scott@netsplit.com \
    --cc=cdahlin@redhat.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox