Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756638AbYLMIn2 (ORCPT ); Sat, 13 Dec 2008 03:43:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753637AbYLMInS (ORCPT ); Sat, 13 Dec 2008 03:43:18 -0500 Received: from zelda.netsplit.com ([87.194.19.211]:54098 "EHLO zelda.netsplit.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbYLMInS (ORCPT ); Sat, 13 Dec 2008 03:43:18 -0500 Subject: Re: [RFC PATCH] waitfd: file descriptor to wait on child processes From: Scott James Remnant To: Davide Libenzi Cc: Casey Dahlin , Linux Kernel In-Reply-To: References: <493EA441.1070706@redhat.com> <1229124491.12618.5.camel@warcraft> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-5W+7fz8Jv2y76EHKm/6j" Date: Sat, 13 Dec 2008 00:43:09 -0800 Message-Id: <1229157789.6128.0.camel@warcraft> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 46 --=-5W+7fz8Jv2y76EHKm/6j Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2008-12-12 at 20:29 -0800, Davide Libenzi wrote: > And how about this? >=20 > sfd =3D signalfd(SIGCHLD); >=20 > for (;;) { > poll(sfd, POLLIN); > while ((pid =3D waitpid(0, &status, WNOHANG)) !=3D -1) > process_child_death(pid); > } >=20 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 --=20 Have you ever, ever felt like this? Had strange things happen? Are you going round the twist? --=-5W+7fz8Jv2y76EHKm/6j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAklDdZIACgkQIexP3IStZ2y0/ACgmfpuccXq6QmOfoiXlNjw+umf eF4An0BN1euSwdLtp2dIpXeZzKyFjWHB =kyIX -----END PGP SIGNATURE----- --=-5W+7fz8Jv2y76EHKm/6j-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/