emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110782: * process.c (wait_reading_pr


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110782: * process.c (wait_reading_process_output): Clean up last change.
Date: Sun, 04 Nov 2012 00:36:23 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110782
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-11-04 00:36:23 +0800
message:
  * process.c (wait_reading_process_output): Clean up last change.
modified:
  src/ChangeLog
  src/process.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-11-03 15:44:59 +0000
+++ b/src/ChangeLog     2012-11-03 16:36:23 +0000
@@ -1,3 +1,8 @@
+2012-11-03  Chong Yidong  <address@hidden>
+
+       * process.c (wait_reading_process_output): Clean up the last
+       change.
+
 2012-11-03  Jim Paris  <address@hidden>  (tiny change)
 
        * process.c (wait_reading_process_output): Avoid a race condition

=== modified file 'src/process.c'
--- a/src/process.c     2012-11-03 15:44:59 +0000
+++ b/src/process.c     2012-11-03 16:36:23 +0000
@@ -4354,8 +4354,6 @@
 
   while (1)
     {
-      int timeout_reduced_for_timers = 0;
-
       /* If calling from keyboard input, do not quit
         since we want to return C-g as an input character.
         Otherwise, do pending quit if requested.  */
@@ -4435,10 +4433,7 @@
              if (EMACS_TIME_VALID_P (timer_delay))
                {
                  if (EMACS_TIME_LT (timer_delay, timeout))
-                   {
-                     timeout = timer_delay;
-                     timeout_reduced_for_timers = 1;
-                   }
+                   timeout = timer_delay;
                }
              else
                {
@@ -4697,11 +4692,11 @@
       /*  If we woke up due to SIGWINCH, actually change size now.  */
       do_pending_window_change (0);
 
-      /* The following optimization fails if SIGIO is received between
-        set_waiting_for_input and select (Bug#11536).
-      if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers)
-       break;
-      */
+      /* We used to break here if nfds == 0, i.e. we seemed to have
+        waited the full period.  But apparently if Emacs receives
+        SIGIO between set_waiting_for_input and select, select can
+        return with nfds == 0 due to the timeout being zeroed out by
+        the signal handler (Bug#11536).  */
 
       if (nfds < 0)
        {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]