From db30b392d38f0fd88fdfdacb7c361e8cef2c0bae Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 22 Feb 2001 04:57:35 +0000 Subject: don't close the magic file descriptor --- src/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index ce0d459d..a880791a 100644 --- a/src/process.c +++ b/src/process.c @@ -115,7 +115,8 @@ int forkCommand(char **args, int *outfd, int *errfd, int *cmdfd, int quiet) { if(sc_open_max > 1) { int fd; for(fd = 3; fd < sc_open_max; fd++) { - close(fd); + if (cmdfd && fd != CMD_FD) + close(fd); } } -- cgit v1.2.1