Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 4 Oct 2001 05:32:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 4 Oct 2001 05:32:09 -0400 Received: from gateway2.ensim.com ([65.164.64.250]:52998 "EHLO nasdaq.ms.ensim.com") by vger.kernel.org with ESMTP id ; Thu, 4 Oct 2001 05:31:59 -0400 X-Mailer: exmh version 2.3 01/15/2001 with nmh-1.0 From: Paul Menage To: Christoph Rohland cc: Paul Menage , linux-kernel@vger.kernel.org Subject: Re: [PATCH][RFC] Pollable /proc// - avoid SIGCHLD/poll() races In-Reply-To: Your message of "04 Oct 2001 10:59:07 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Oct 2001 02:31:40 -0700 Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >> The only real user-space solution to this is to have the SIGCHLD >> handler somehow cause the select() to return immediately > >... or implement pselect: >http://mesh.eecs.umich.edu/cgi-bin/man2html/usr/share/man/man2/select.2.gz Agreed, althought that's not a user-space solution. Is there any fundamental reason why no-one's implemented pselect()/ppoll() for Linux yet? > >or use sigsetjmp/siglongjmp Yes, that would probably solve the situation in question, provided that siglongjmp() is portably safe. (A comment on LKML in the past suggested that it's not safe on cygwin, for example.) > >Both would be portable and not special to child handling. One advantage of the pollable /proc/, (when combined with do_notify_parent() waking tsk->exit_chldwait) is that any process can check for the exit of any other process (not just direct children) in a select()/poll() call. Paul - 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/