]> git.ipfire.org Git - pakfire.git/commitdiff
jail: If no output handling has been configured dump stuff on the terminal
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 13:59:57 +0000 (13:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 13:59:57 +0000 (13:59 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index d4aebb98c631af80439a1084025b4a9f535acf14..68522ecaabaf8928e56c3ce7dc26deaf49623deb 100644 (file)
@@ -1379,10 +1379,18 @@ static int __pakfire_jail_exec(struct pakfire_jail* jail,
                        r = -ENOTSUP;
                        goto ERROR;
                }
+
+       // Do nothing if we have a callback set
+       } else if (stdout_callback) {
+               // Nothing
+
+       // Capture Output?
+       } else if (output) {
+               pty_flags |= PAKFIRE_PTY_CAPTURE_OUTPUT;
+
+       // Otherwise we dump everything to the console
        } else {
-               // Capture Output?
-               if (output)
-                       pty_flags |= PAKFIRE_PTY_CAPTURE_OUTPUT;
+               pty_flags |= PAKFIRE_PTY_CONNECT_STDOUT;
        }
 
        /*