]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Actually call the new event loop
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Oct 2024 17:30:44 +0000 (17:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Oct 2024 17:30:44 +0000 (17:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index dfc50278fdf8e69dcebf94cd25b0341b6bfd6d6e..5cf17bbc2a7be2476675cf86a3912e13174038bc 100644 (file)
@@ -2343,12 +2343,14 @@ PAKFIRE_EXPORT int pakfire_jail_exec(struct pakfire_jail* jail, const char* argv
        if (r)
                goto ERROR;
 
-       CTX_DEBUG(jail->ctx, "Waiting for PID %d to finish its work\n", ctx.pid);
+       CTX_DEBUG(jail->ctx, "Entering main loop...\n");
 
-       // Read output of the child process
-       r = pakfire_jail_wait(jail, &ctx);
-       if (r)
+       // Main Loop
+       r = sd_event_loop(ctx.loop);
+       if (r < 0) {
+               CTX_ERROR(jail->ctx, "Could not run the event loop: %s\n", strerror(-r));
                goto ERROR;
+       }
 
 ERROR:
        // Reset all callbacks