aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-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