Fixes: #13003 - Python exception when exiting the build jail or requested shell
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
}
int pakfire_jail_shell(struct pakfire_jail* jail) {
+ int r;
+
const char* argv[] = {
"/bin/bash", "--login", NULL,
};
// Execute /bin/bash
- return pakfire_jail_exec_interactive(jail, argv, 0);
+ r = pakfire_jail_exec_interactive(jail, argv, 0);
+
+ // Raise any errors
+ if (r < 0)
+ return r;
+
+ // Ignore any return codes from the shell
+ return 0;
}
static int pakfire_jail_run_if_possible(struct pakfire* pakfire, const char** argv) {