GNU bug report logs - #20978
25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes

Previous Next

Package: emacs;

Reported by: Ian Kelling <ian <at> iankelling.org>

Date: Sat, 4 Jul 2015 12:35:02 UTC

Severity: normal

Tags: patch

Found in version 25.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20978 <at> debbugs.gnu.org (full text, mbox):

From: Ian Kelling <ian <at> iankelling.org>
To: 20978 <at> debbugs.gnu.org
Subject: [PATCH 1/7] ; Minor cleanup of wait_reading_process_output
Date: Sat, 04 Jul 2015 05:37:34 -0700
* src/process.c (wait_reading_process_output): simplify logic, fix dos
version comments

diff --git a/src/process.c b/src/process.c
index 5272792..191f617 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4873,8 +4873,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
          no_avail = 1;
          FD_ZERO (&Available);
        }
-
-      if (!no_avail)
+      else
        {

 #ifdef ADAPTIVE_READ_BUFFERING
@@ -6965,9 +6964,7 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *,
    DO_DISPLAY means redisplay should be done to show subprocess
    output that arrives.

-   Return positive if we received input from WAIT_PROC (or from any
-   process if WAIT_PROC is null), zero if we attempted to receive
-   input but got none, and negative if we didn't even try.  */
+   Returns -1 signifying we got no output and did not try.  */

 int
 wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
--
2.4.5





This bug report was last modified 9 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.