From: Tassilo Horn Date: Sat, 3 Oct 2015 04:01:42 +0000 (+0200) Subject: Revert my two recent process.c changes X-Git-Tag: emacs-25.0.90~1223^2~26 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de7fc458e99867b6cb540ec033c3b740a1dd65e9;p=emacs.git 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.. --- diff --git a/src/process.c b/src/process.c index 42dd17c57e0..55f31a02673 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++)