From a59511ec2d06d6d07912da193756d163ee8f7998 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 20 Aug 2022 00:01:21 +0100 Subject: [PATCH 1/1] prefork-interp: fixes Signed-off-by: Ian Jackson --- cprogs/prefork-interp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cprogs/prefork-interp.c b/cprogs/prefork-interp.c index 71bcbd6..fcb2e97 100644 --- a/cprogs/prefork-interp.c +++ b/cprogs/prefork-interp.c @@ -447,6 +447,7 @@ void become_setup(int sfd, int fake_pair[2], int null_0 = open("/dev/null", O_RDONLY); if (null_0 < 0) diee("open null"); if (dup2(null_0, 0)) diee("dup2 /dev/null onto stdin"); + close(null_0); if (dup2(2, 1) != 1) die("dup2 stderr onto stdout"); nonblock(sfd); -- 2.30.2