aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTassilo Horn2015-09-22 10:19:25 +0200
committerTassilo Horn2015-09-22 10:20:17 +0200
commitbfa1aa8e2bdaf14adbbf1e9e824051d3f740694c (patch)
treeb94757d1556f2e1c37da8dedf960b32c756ad00c /src
parent170ed29b438ed0d9f31f1cd1f2f6d9808540763d (diff)
downloademacs-bfa1aa8e2bdaf14adbbf1e9e824051d3f740694c.tar.gz
emacs-bfa1aa8e2bdaf14adbbf1e9e824051d3f740694c.zip
Improve last commit to process.c
Diffstat (limited to 'src')
-rw-r--r--src/process.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c
index 73704c03ee7..42dd17c57e0 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,
5031 for (channel = 0; channel <= max_input_desc; ++channel) 5031 for (channel = 0; channel <= max_input_desc; ++channel)
5032 { 5032 {
5033 struct fd_callback_data *d = &fd_callback_info[channel]; 5033 struct fd_callback_data *d = &fd_callback_info[channel];
5034 if (d->func 5034 if (d->func)
5035 && ((d->condition & FOR_READ
5036 && FD_ISSET (channel, &Available))
5037 || (d->condition & FOR_WRITE
5038 && FD_ISSET (channel, &write_mask))))
5039 { 5035 {
5040 d->func (channel, d->data); 5036 if (d->condition & FOR_READ
5041 FD_CLR (channel, &Available); 5037 && FD_ISSET (channel, &Available))
5038 {
5039 d->func (channel, d->data);
5040 FD_CLR (channel, &Available);
5041 }
5042 else if (d->condition & FOR_WRITE
5043 && FD_ISSET (channel, &write_mask))
5044 d->func (channel, d->data);
5042 } 5045 }
5043 } 5046 }
5044 5047