From: Michael Tremer Date: Sat, 12 Oct 2024 13:59:57 +0000 (+0000) Subject: jail: If no output handling has been configured dump stuff on the terminal X-Git-Tag: 0.9.30~1081 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af597242abe5ccfb2d8359a9d613184987d86c90;p=pakfire.git jail: If no output handling has been configured dump stuff on the terminal Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/jail.c b/src/libpakfire/jail.c index d4aebb98c..68522ecaa 100644 --- a/src/libpakfire/jail.c +++ b/src/libpakfire/jail.c @@ -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; } /*