aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index a880791a..4ff805ef 100644
--- a/src/process.c
+++ b/src/process.c
@@ -115,7 +115,7 @@ 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++) {
- if (cmdfd && fd != CMD_FD)
+ if (!(cmdfd && fd == CMD_FD))
close(fd);
}
}