unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: joakim@verona.se
Cc: Emacs Development <emacs-devel@gnu.org>
Subject: Re: Can we apply this patch for bug 84 and 425?
Date: Tue, 07 Oct 2008 16:45:09 -0400	[thread overview]
Message-ID: <jwvd4ic6sqs.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3tzboux0h.fsf@verona.se> (joakim@verona.se's message of "Tue, 07 Oct 2008 19:37:34 +0200")

> 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




  parent reply	other threads:[~2008-10-07 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07 17:37 Can we apply this patch for bug 84 and 425? joakim
2008-10-07 18:23 ` Chong Yidong
     [not found]   ` <m3fxn8uoza.fsf@verona.se>
2008-10-07 21:05     ` Chong Yidong
2008-10-07 20:45 ` Stefan Monnier [this message]
2008-10-07 21:10   ` Chong Yidong
2008-10-08  8:59   ` joakim
2008-10-08 15:55     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvd4ic6sqs.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).