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#14474: 24.3.50; Zombie subprocesses (again) Date: Fri, 31 May 2013 18:03:55 -0700 Organization: UCLA Computer Science Department Message-ID: <51A9487B.5080805@cs.ucla.edu> References: <87ppwevddb.fsf@web.de> <51A24870.8020909@cs.ucla.edu> <87fvx93818.fsf@web.de> <51A2B88F.1090404@cs.ucla.edu> <1369658780.23869.57.camel@localhost> 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 1370048681 31677 80.91.229.3 (1 Jun 2013 01:04:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Jun 2013 01:04:41 +0000 (UTC) Cc: Michael Heerdegen , Michael Albinus , 14474@debbugs.gnu.org To: Colin Walters Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 01 03:04:40 2013 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 1UiaFJ-0000kV-MV for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Jun 2013 03:04:37 +0200 Original-Received: from localhost ([::1]:54799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiaFJ-0002Cs-1W for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 May 2013 21:04:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiaFB-0002Ca-Sq for bug-gnu-emacs@gnu.org; Fri, 31 May 2013 21:04:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiaF6-00019J-Lk for bug-gnu-emacs@gnu.org; Fri, 31 May 2013 21:04:29 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiaF6-00019D-Gr for bug-gnu-emacs@gnu.org; Fri, 31 May 2013 21:04:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UiaGg-0001Dv-7q for bug-gnu-emacs@gnu.org; Fri, 31 May 2013 21:06:02 -0400 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: Sat, 01 Jun 2013 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14474 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14474-submit@debbugs.gnu.org id=B14474.13700487484661 (code B ref 14474); Sat, 01 Jun 2013 01:06:02 +0000 Original-Received: (at 14474) by debbugs.gnu.org; 1 Jun 2013 01:05:48 +0000 Original-Received: from localhost ([127.0.0.1]:45443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UiaGR-0001D6-Oh for submit@debbugs.gnu.org; Fri, 31 May 2013 21:05:48 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:53507) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UiaGP-0001CW-0Y for 14474@debbugs.gnu.org; Fri, 31 May 2013 21:05:46 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AC13139E8100; Fri, 31 May 2013 18:04:00 -0700 (PDT) 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 eNXopiT0ULdW; Fri, 31 May 2013 18:04:00 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 40CCE39E8008; Fri, 31 May 2013 18:04:00 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 In-Reply-To: <1369658780.23869.57.camel@localhost> 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:74722 Archived-At: On 05/27/2013 05:46 AM, Colin Walters wrote: >> One possibility is to see if we can get Emacs to use >> > glib's child watcher. > That'd be best obviously. I looked into this a bit, and found a problem. Emacs wants to be notified about child processes that are stopped, so it invokes waitpid with the WUNTRACED option, but glib never uses WUNTRACED when invoking waitpid. If Emacs used glib to watch for child processes, Emacs will not be informed about a child process changing state because it has stopped. (Similarly for WCONTINUED and processes that have been continued.) Perhaps glib needs a new function, which lets the caller specify additional options to be given to waitpid? Something like this, say: g_child_watch_source_new_full (pid, WUNTRACED | WCONTINUED) Then, g_child_watch_source_new (pid) would be equivalent to g_child_watch_source_new_full (pid, 0).