diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 18 |
1 files changed, 6 insertions, 12 deletions
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, | |||
| 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 | { | 5035 | && ((d->condition & FOR_READ |
| 5036 | if (d->condition & FOR_READ | 5036 | && FD_ISSET (channel, &Available)) |
| 5037 | && FD_ISSET (channel, &Available)) | 5037 | || (d->condition & FOR_WRITE |
| 5038 | { | 5038 | && FD_ISSET (channel, &write_mask)))) |
| 5039 | d->func (channel, d->data); | 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); | ||
| 5045 | } | ||
| 5046 | } | 5040 | } |
| 5047 | 5041 | ||
| 5048 | for (channel = 0; channel <= max_process_desc; channel++) | 5042 | for (channel = 0; channel <= max_process_desc; channel++) |