From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8855: dbus error at startup Date: Mon, 29 Oct 2012 19:06:56 +0200 Message-ID: <83a9v58axb.fsf@gnu.org> References: <5088CF93.2020802@cs.ucla.edu> <83y5iua59n.fsf@gnu.org> <508DDE0A.9020903@cs.ucla.edu> <87hapdeilv.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1351530525 24356 80.91.229.3 (29 Oct 2012 17:08:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2012 17:08:45 +0000 (UTC) Cc: eggert@cs.ucla.edu, 8855@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 29 18:08:54 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 1TSspW-0002QR-UK for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2012 18:08:51 +0100 Original-Received: from localhost ([::1]:58590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSspO-0002Ak-HE for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2012 13:08:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSspM-0002Af-8f for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 13:08:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSspH-0002r9-P8 for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 13:08:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSspH-0002r2-LM for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 13:08:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSsre-0007qJ-1I for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Oct 2012 17:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8855 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8855-submit@debbugs.gnu.org id=B8855.135153062130101 (code B ref 8855); Mon, 29 Oct 2012 17:11:01 +0000 Original-Received: (at 8855) by debbugs.gnu.org; 29 Oct 2012 17:10:21 +0000 Original-Received: from localhost ([127.0.0.1]:38401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSsqz-0007pS-1H for submit@debbugs.gnu.org; Mon, 29 Oct 2012 13:10:21 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:45781) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSsqw-0007pI-1O for 8855@debbugs.gnu.org; Mon, 29 Oct 2012 13:10:19 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MCN00A00ZGM6400@a-mtaout22.012.net.il> for 8855@debbugs.gnu.org; Mon, 29 Oct 2012 19:06:46 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MCN009KCZJ9Z650@a-mtaout22.012.net.il>; Mon, 29 Oct 2012 19:06:46 +0200 (IST) In-reply-to: <87hapdeilv.fsf@gnu.org> X-012-Sender: halo1@inter.net.il 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 (newer, 2) 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:66199 Archived-At: > From: Chong Yidong > Cc: Eli Zaretskii , 8855@debbugs.gnu.org > Date: Mon, 29 Oct 2012 17:24:28 +0800 > > Paul Eggert writes: > > > Attached is a slightly less-intrusive version of the patch. > > It omits the removal of "#ifdef SIGCHLD", which isn't > > strictly needed to fix the bug. I don't see any further > > simplifications, unfortunately. The patch fixes a bug that's > > been reported multiple times so I'm thinking it may be > > worthwhile to install now, even though there's a feature > > freeze. > > I think the patch is OK to commit. I agree. I also think that after the feature freeze is lifted, it would be good to refactor the related code so that, e.g., the loop in process_status_retrieved is joined with the loop(s) in record_child_status_change. Since we are now asking about a single process at a time, I don't see why we need a loop inside a loop. Previous code didn't have this nested-loop structure, AFAICS. Btw, what about Posix platforms that don't have WNOHANG defined, and therefore have 'waitpid' redirected to 'wait' -- are they the same ones which have CAN_HANDLE_MULTIPLE_CHILDREN set to zero? (The cpp directives don't match.) If some of them don't, then will this new code work for them with 'wait'? P.S. Incidentally, the MS-Windows build always had a 'waitpid'-like implementation of its 'wait' emulation, it just pretended to be checking all of its child processes, because that's what the mainline code wanted, but actually always knew which process it should check for. I guess time is ripe for refactoring that code into an emulation of 'waitpid'. P.P.S. We use record_child_status_change in another place as well: in sysdep.c:wait_for_termination_1. Will the change in the former still work correctly in the latter (and its callers)?