emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master de7fc45: Revert my two recent process.c changes


From: Tassilo Horn
Subject: [Emacs-diffs] master de7fc45: Revert my two recent process.c changes
Date: Sat, 03 Oct 2015 04:13:02 +0000

branch: master
commit de7fc458e99867b6cb540ec033c3b740a1dd65e9
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Revert my two recent process.c changes
    
    Revert "Improve last commit to process.c" and "Remove callback-handled
    channels from Available set" because they did not fix bug#21313.
    
    This reverts commits bfa1aa8e2bdaf14adbbf1e9e824051d3f740694c and
    27f871907cc24f33a7d12ac3a4ab71a88f0bc554..
---
 src/process.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/process.c b/src/process.c
index 42dd17c..55f31a0 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5031,18 +5031,12 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       for (channel = 0; channel <= max_input_desc; ++channel)
         {
           struct fd_callback_data *d = &fd_callback_info[channel];
-          if (d->func)
-           {
-             if (d->condition & FOR_READ
-                 && FD_ISSET (channel, &Available))
-               {
-                 d->func (channel, d->data);
-                 FD_CLR (channel, &Available);
-               }
-             else if (d->condition & FOR_WRITE
-                      && FD_ISSET (channel, &write_mask))
-               d->func (channel, d->data);
-           }
+          if (d->func
+             && ((d->condition & FOR_READ
+                  && FD_ISSET (channel, &Available))
+                 || (d->condition & FOR_WRITE
+                     && FD_ISSET (channel, &write_mask))))
+            d->func (channel, d->data);
        }
 
       for (channel = 0; channel <= max_process_desc; channel++)



reply via email to

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