From 27f871907cc24f33a7d12ac3a4ab71a88f0bc554 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Tue, 22 Sep 2015 07:43:39 +0200 Subject: [PATCH] Remove callback-handled channels from Available set * src/process.c (wait_reading_process_output): Remove channel from Available set if it is handled by a callback, e.g., dbus or inotify (bug#21313). --- src/process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 55f31a02673..73704c03ee7 100644 --- a/src/process.c +++ b/src/process.c @@ -5036,7 +5036,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && FD_ISSET (channel, &Available)) || (d->condition & FOR_WRITE && FD_ISSET (channel, &write_mask)))) - d->func (channel, d->data); + { + d->func (channel, d->data); + FD_CLR (channel, &Available); + } } for (channel = 0; channel <= max_process_desc; channel++) -- 2.39.2