]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert my two recent process.c changes
authorTassilo Horn <tsdh@gnu.org>
Sat, 3 Oct 2015 04:01:42 +0000 (06:01 +0200)
committerTassilo Horn <tsdh@gnu.org>
Sat, 3 Oct 2015 04:02:11 +0000 (06:02 +0200)
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

index 42dd17c57e07990368cc75eba869c74d95bc6f25..55f31a0267347201d3d3b0cd4f0d8f9b1e77413f 100644 (file)
@@ -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++)