dotfiles/nixos/tests/hel/0001-Don-t-close-stdout-stderr-when-running-a-script.patch
magic_rb 0e7389fcbd
More network test work
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-08-14 15:59:24 +02:00

26 lines
772 B
Diff

From ce950ae409a3a7d9ba259e61e0f029005a12512e Mon Sep 17 00:00:00 2001
From: magic_rb <richard@brezak.sk>
Date: Tue, 6 Aug 2024 19:04:43 +0200
Subject: [PATCH 1/3] Don't close stdout, stderr when running a script
Signed-off-by: magic_rb <richard@brezak.sk>
---
pppd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/main.c b/pppd/main.c
index 8310c98..de6d6f4 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -1918,7 +1918,7 @@ run_program(char *prog, char * const *args, int must_exist, void (*done)(void *)
return 0;
}
- pid = ppp_safe_fork(fd_devnull, fd_devnull, fd_devnull);
+ pid = ppp_safe_fork(fd_devnull, 1, 2);
if (pid == -1) {
error("Failed to create child process for %s: %m", prog);
return -1;
--
2.44.1