From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#12980: 24.3.50; Zombie process left after call-process Date: Thu, 29 Nov 2012 12:28:24 -0800 Message-ID: <50B7C568.7040108@cs.ucla.edu> References: <50B3EF71.3020805@cs.ucla.edu> <83ehjfxcg7.fsf@gnu.org> <50B6C8B0.3000403@cs.ucla.edu> <83pq2wuvy0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354220947 3775 80.91.229.3 (29 Nov 2012 20:29:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2012 20:29:07 +0000 (UTC) Cc: 9488@debbugs.gnu.org, hanche@math.ntnu.no, 12980@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 21:29:18 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeAjU-00086w-QU for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 21:29:16 +0100 Original-Received: from localhost ([::1]:42699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeAjJ-0006C6-G7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 15:29:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeAjG-0006Az-Fq for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2012 15:29:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeAjF-0001Ic-Hm for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2012 15:29:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeAjF-0001IY-EQ for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2012 15:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TeAlC-000297-5Q for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2012 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Nov 2012 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12980-submit@debbugs.gnu.org id=B12980.13542210328206 (code B ref 12980); Thu, 29 Nov 2012 20:31:02 +0000 Original-Received: (at 12980) by debbugs.gnu.org; 29 Nov 2012 20:30:32 +0000 Original-Received: from localhost ([127.0.0.1]:45636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeAkg-00028H-Ty for submit@debbugs.gnu.org; Thu, 29 Nov 2012 15:30:31 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:43297) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeAkd-000285-St; Thu, 29 Nov 2012 15:30:29 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 9EF4BA60008; Thu, 29 Nov 2012 12:28:25 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8TskRWL55zWr; Thu, 29 Nov 2012 12:28:25 -0800 (PST) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3EF19A60005; Thu, 29 Nov 2012 12:28:25 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <83pq2wuvy0.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67604 Archived-At: On 11/29/12 10:04, Eli Zaretskii wrote: >> + /* CHILD must be a child process that has not been reaped, and >> + STATUS and OPTIONS must be valid. */ >> + eassert (errno == EINTR); > > Are we sure that either CHILD will have exited at this point, or else > OPTIONS won't include WNOHANG? It's unlikely that CHILD will have exited at this point. That can happen only if CHILD exited after the immediately-preceding waitpid call and before this eassert. In such a case, CHILD has exited but has not been reaped. It's common for OPTIONS to not include WNOHANG (wait_for_termination does this), and when that happens it's almost always the case that CHILD has not exited at this point. > Can this function be ever called if > neither of these conditions is true? By "this function" I assume you mean get_child_status. Yes, it's quite common. For example, Fcall_process invokes wait_for_termination, and it's common for wait_for_termination to invoke get_child_status before CHILD has exited, and without WNOHANG in OPTIONS.