We want write() to block if the pipe is full and not drop any messages.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// 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;