From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Can we apply this patch for bug 84 and 425? Date: Tue, 07 Oct 2008 16:45:09 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223412776 18392 80.91.229.12 (7 Oct 2008 20:52:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 20:52:56 +0000 (UTC) Cc: Emacs Development To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 07 22:53:53 2008 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 1KnJYs-0004sJ-0p for ged-emacs-devel@m.gmane.org; Tue, 07 Oct 2008 22:53:42 +0200 Original-Received: from localhost ([127.0.0.1]:60462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnJXo-0007Fj-Gq for ged-emacs-devel@m.gmane.org; Tue, 07 Oct 2008 16:52:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnJQi-0003FP-39 for emacs-devel@gnu.org; Tue, 07 Oct 2008 16:45:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnJQg-0003Dp-44 for emacs-devel@gnu.org; Tue, 07 Oct 2008 16:45:15 -0400 Original-Received: from [199.232.76.173] (port=53451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnJQf-0003Dh-Rx for emacs-devel@gnu.org; Tue, 07 Oct 2008 16:45:13 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:57001) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnJQf-0000tv-FK for emacs-devel@gnu.org; Tue, 07 Oct 2008 16:45:13 -0400 Original-Received: from alfajor.home (vpn-132-204-232-223.acd.umontreal.ca [132.204.232.223]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m97KjfIA024380; Tue, 7 Oct 2008 16:45:41 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id A21AE1C54B; Tue, 7 Oct 2008 16:45:09 -0400 (EDT) In-Reply-To: (joakim@verona.se's message of "Tue, 07 Oct 2008 19:37:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3120=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:104401 Archived-At: > These bugs are both about hangs when emacs deals with external processes: > http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84 > http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425 > Markus Triska has a patch which reduces my experiences of the hang from > about once a day to not at all so far. > How can we proceed with this patch? > diff --git a/src/process.c b/src/process.c > index e8d0090..0cf04bc 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -4791,6 +4791,10 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, > else if (nread == -1 && EWOULDBLOCK == errno) > break; > #endif > +#ifdef EBADF > + else if (nread == -1 && EBADF == errno) > + break; > +#endif > } > if (total_nread > 0 && do_display) > redisplay_preserve_echo_area (10); This patch is not acceptable as-is: EBADF should normally be a symptom of another bug in Emacs (we should never pass a bad descriptor), so rather than ignore it, we should figure out where it comes from and fix it there. Stefan