emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master bfa1aa8: Improve last commit to process.c


From: Tassilo Horn
Subject: [Emacs-diffs] master bfa1aa8: Improve last commit to process.c
Date: Tue, 22 Sep 2015 08:20:34 +0000

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

    Improve last commit to process.c
---
 src/process.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/process.c b/src/process.c
index 73704c0..42dd17c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5031,14 +5031,17 @@ 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
-             && ((d->condition & FOR_READ
-                  && FD_ISSET (channel, &Available))
-                 || (d->condition & FOR_WRITE
-                     && FD_ISSET (channel, &write_mask))))
+          if (d->func)
            {
-             d->func (channel, d->data);
-             FD_CLR (channel, &Available);
+             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);
            }
        }
 



reply via email to

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