]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Fix FD check in stdin
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Dec 2023 15:30:13 +0000 (15:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Dec 2023 15:30:13 +0000 (15:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index 5d091c58c7dc5f699033fb59ceb2629c284b8ecf..ed1223d65153953694d045539bfa6349db915cf9 100644 (file)
@@ -655,7 +655,7 @@ static int pakfire_jail_stream_stdin(struct pakfire_jail* jail,
        }
 
        // Skip if the writing pipe has already been closed
-       if (!ctx->pipes.stdin[1])
+       if (ctx->pipes.stdin[1] < 0)
                return 0;
 
        DEBUG(jail->pakfire, "Streaming standard input...\n");