]> git.ipfire.org Git - pakfire.git/commitdiff
log stream: Only call the read function when there is new data to read
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2025 17:47:13 +0000 (17:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2025 17:47:13 +0000 (17:47 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/log_stream.c

index 5bed8fa18e2bd0d708ae446c210b52c64609a491..7442242c0f73435a50eba09ba2087069e17a16a7 100644 (file)
@@ -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;