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#21313: 25.0.50; Strange errors from dbus-handle-event Date: Tue, 15 Sep 2015 19:01:42 +0300 Message-ID: <83zj0n7jtl.fsf@gnu.org> References: <877foo4nkd.fsf@gnu.org> <87wpvzs4r3.fsf@gnu.org> <87bnd9cf7g.fsf@gnu.org> <831te53zbq.fsf@gnu.org> <871te5cdg7.fsf@gnu.org> <83wpvx2h16.fsf@gnu.org> <87r3lziti9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1442332947 27870 80.91.229.3 (15 Sep 2015 16:02:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Sep 2015 16:02:27 +0000 (UTC) Cc: 21313@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 15 18:02:15 2015 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 1ZbsgR-0001uZ-9d for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Sep 2015 18:02:15 +0200 Original-Received: from localhost ([::1]:44109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbsgQ-0000Ek-6A for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Sep 2015 12:02:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbsgH-00005d-Ep for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2015 12:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbsgE-0001bw-8W for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2015 12:02:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbsgE-0001br-5y for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2015 12:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZbsgD-000324-R1 for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2015 12:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Sep 2015 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21313 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21313-submit@debbugs.gnu.org id=B21313.144233290511612 (code B ref 21313); Tue, 15 Sep 2015 16:02:01 +0000 Original-Received: (at 21313) by debbugs.gnu.org; 15 Sep 2015 16:01:45 +0000 Original-Received: from localhost ([127.0.0.1]:33468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zbsfx-00031E-2Z for submit@debbugs.gnu.org; Tue, 15 Sep 2015 12:01:45 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:53924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zbsfv-000313-1m for 21313@debbugs.gnu.org; Tue, 15 Sep 2015 12:01:43 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NUQ00I0071V5900@a-mtaout20.012.net.il> for 21313@debbugs.gnu.org; Tue, 15 Sep 2015 19:01:41 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUQ00IMG76S1C40@a-mtaout20.012.net.il>; Tue, 15 Sep 2015 19:01:41 +0300 (IDT) In-reply-to: <87r3lziti9.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.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:106598 Archived-At: > From: Tassilo Horn > Cc: 21313@debbugs.gnu.org > Date: Tue, 15 Sep 2015 17:37:02 +0200 > > I wondered why channel is not removed from Available here. I mean, > input was available, and then the handlers registered using add_read_fd > by inotify or dbus consumed the input, so there's probably no input > left. So I tried this patch > > --8<---------------cut here---------------start------------->8--- > diff --git a/src/process.c b/src/process.c > index ed5f4c0..7985e37 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -5036,7 +5036,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, > && FD_ISSET (channel, &Available)) > || (d->condition & FOR_WRITE > && FD_ISSET (channel, &write_mask)))) > - d->func (channel, d->data); > + { > + d->func (channel, d->data); > + FD_CLR (channel, &Available); > + } > } > > for (channel = 0; channel <= max_process_desc; channel++) > --8<---------------cut here---------------end--------------->8--- > > and since then the problem has not appeared again and I can't see any > obvious other malfunction. But of course that's really a naive change. > I can grasp the big picture of wait_reading_process_output but not all > the details. If no one objects in a week, please push this, and let's see what it breaks. Thanks.