From: Michael Tremer Date: Thu, 4 Aug 2022 13:39:30 +0000 (+0000) Subject: jail: Don't open log descriptors are non-blocking X-Git-Tag: 0.9.28~589 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ca5e607653f6e476f62e522b89a5eea46461c63;p=pakfire.git jail: Don't open log descriptors are non-blocking We want write() to block if the pipe is full and not drop any messages. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/jail.c b/src/libpakfire/jail.c index ae94e7b9a..a48823474 100644 --- a/src/libpakfire/jail.c +++ b/src/libpakfire/jail.c @@ -1126,14 +1126,14 @@ static int __pakfire_jail_exec(struct pakfire_jail* jail, const char* argv[]) { // Create pipes to communicate with child process if we are not running interactively if (!pakfire_jail_has_flag(jail, PAKFIRE_JAIL_INTERACTIVE)) { // stdout - r = pipe2(ctx.pipes.stdout, O_NONBLOCK); + r = pipe(ctx.pipes.stdout); if (r < 0) { ERROR(jail->pakfire, "Could not create file descriptors for stdout: %m\n"); goto ERROR; } // stderr - r = pipe2(ctx.pipes.stderr, O_NONBLOCK); + r = pipe(ctx.pipes.stderr); if (r < 0) { ERROR(jail->pakfire, "Could not create file descriptors for stderr: %m\n"); goto ERROR;