From: Michael Tremer Date: Tue, 28 Jan 2025 17:47:13 +0000 (+0000) Subject: log stream: Only call the read function when there is new data to read X-Git-Tag: 0.9.30~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41eebd2736f974145d282dd992d72746ea9c4da;p=pakfire.git log stream: Only call the read function when there is new data to read Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/log_stream.c b/src/pakfire/log_stream.c index 5bed8fa1..7442242c 100644 --- a/src/pakfire/log_stream.c +++ b/src/pakfire/log_stream.c @@ -198,7 +198,7 @@ int pakfire_log_stream_in_parent(struct pakfire_log_stream* stream, sd_event* lo // Register the file descriptor with the event loop r = sd_event_add_io(loop, &stream->event, stream->pipe[0], - EPOLLIN|EPOLLHUP, __pakfire_log_stream, stream); + EPOLLIN|EPOLLHUP|EPOLLET, __pakfire_log_stream, stream); if (r < 0) { ERROR(stream->ctx, "Could not register fd %d: %s\n", stream->pipe[0], strerror(-r)); return r;