]> git.ipfire.org Git - pakfire.git/commitdiff
execute: Do not close stdin in forked processes
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 May 2021 17:44:31 +0000 (17:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 May 2021 17:44:31 +0000 (17:44 +0000)
Configure scripts try reading from this file descriptor and duplicating
it which will fail if stdin has been closed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/execute.c

index 4c1ec741ea5a78c8282f6293b7a57efb2f3c06e9..13ccce8f4353a13764ca0ab3e1c26610951a32eb 100644 (file)
@@ -313,9 +313,6 @@ static int pakfire_execute_fork(void* data) {
                // Close the reading sides of the pipe
                close(env->stdout[0]);
                close(env->stderr[0]);
-
-               // Close standard input
-               close(STDIN_FILENO);
        }
 
        // exec() command