diff options
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } } |