aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-02-22 04:57:35 +0000
committerBill Nottingham <notting@redhat.com>2001-02-22 04:57:35 +0000
commitdb30b392d38f0fd88fdfdacb7c361e8cef2c0bae (patch)
tree110a5ee1bb7fe4ee74a41d1b79c825280ff6f71e /src/process.c
parent87cbd990b396dac850209a097fae7e6a12313e8f (diff)
downloadinitscripts-db30b392d38f0fd88fdfdacb7c361e8cef2c0bae.tar
initscripts-db30b392d38f0fd88fdfdacb7c361e8cef2c0bae.tar.gz
initscripts-db30b392d38f0fd88fdfdacb7c361e8cef2c0bae.tar.bz2
initscripts-db30b392d38f0fd88fdfdacb7c361e8cef2c0bae.tar.xz
initscripts-db30b392d38f0fd88fdfdacb7c361e8cef2c0bae.zip
don't close the magic file descriptor
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c3
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);
}
}