From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: busyloop in sigchld_handler Date: Wed, 14 Mar 2007 15:10:28 +0100 Message-ID: References: <45F59395.4010708@gnu.org> <45F5A2B4.7090301@gnu.org> <85ejnumf1o.fsf@lola.goethe.zz> <868xe11tzu.fsf@lola.quinscape.zz> <85abyglrbs.fsf@lola.goethe.zz> <85tzwokb4x.fsf@lola.goethe.zz> <86tzwoxq1q.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173881408 4265 80.91.229.12 (14 Mar 2007 14:10:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Mar 2007 14:10:08 +0000 (UTC) Cc: Sam Steingold , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 14 15:09:52 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HRUAj-0001Nn-K1 for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2007 15:09:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRUBc-0000yD-Ja for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2007 09:10:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HRUBY-0000rP-VN for emacs-devel@gnu.org; Wed, 14 Mar 2007 10:10:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HRUBY-0000oh-6L for emacs-devel@gnu.org; Wed, 14 Mar 2007 10:10:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRUBY-0000oB-0z for emacs-devel@gnu.org; Wed, 14 Mar 2007 09:10:36 -0500 Original-Received: from pfepc.post.tele.dk ([195.41.46.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HRUAW-0004W4-Kl; Wed, 14 Mar 2007 10:09:32 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id 709468A0061; Wed, 14 Mar 2007 15:09:30 +0100 (CET) In-Reply-To: (Andreas Schwab's message of "Wed\, 14 Mar 2007 14\:41\:01 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67932 Archived-At: Andreas Schwab writes: > storm@cua.dk (Kim F. Storm) writes: > >> Andreas Schwab writes: >> >>> storm@cua.dk (Kim F. Storm) writes: >>> >>>> Why do we care about stopped processes? >>> >>> It is one of the possible states of a process, see process-status. Any >>> job control shell need to be able to handle that. >> >> Yes, but how does a stopped process cause a sigchld signal to be sent >> to the parent? > > By not using SA_NOCLDSTOP when you register the handler. > Ah yes. But the WUNTRACED flag doesn't mean we don't get info about stopped processes, it means we also get info about stopped ptrace'd processes: switch (p->state) { case TASK_STOPPED: if (!p->exit_code) continue; if (!(options & WUNTRACED) && !(p->ptrace & PT_PTRACED)) continue; But it's not relevant here, I guess. -- Kim F. Storm http://www.cua.dk