diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/process.c b/src/process.c index 7f6f6bafbea..64c70c49590 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4870,15 +4870,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4870 | for (channel = 0; channel <= max_input_desc; ++channel) | 4870 | for (channel = 0; channel <= max_input_desc; ++channel) |
| 4871 | { | 4871 | { |
| 4872 | struct fd_callback_data *d = &fd_callback_info[channel]; | 4872 | struct fd_callback_data *d = &fd_callback_info[channel]; |
| 4873 | if (FD_ISSET (channel, &Available) | 4873 | if (d->func |
| 4874 | && d->func != 0 | 4874 | && ((d->condition & FOR_READ |
| 4875 | && (d->condition & FOR_READ) != 0) | 4875 | && FD_ISSET (channel, &Available)) |
| 4876 | d->func (channel, d->data, 1); | 4876 | || (d->condition & FOR_WRITE |
| 4877 | if (FD_ISSET (channel, &write_mask) | 4877 | && FD_ISSET (channel, &write_mask)))) |
| 4878 | && d->func != 0 | 4878 | d->func (channel, d->data); |
| 4879 | && (d->condition & FOR_WRITE) != 0) | 4879 | } |
| 4880 | d->func (channel, d->data, 0); | ||
| 4881 | } | ||
| 4882 | 4880 | ||
| 4883 | for (channel = 0; channel <= max_process_desc; channel++) | 4881 | for (channel = 0; channel <= max_process_desc; channel++) |
| 4884 | { | 4882 | { |