summaryrefslogtreecommitdiffstats
path: root/askfirst.c
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2013-07-23 10:28:38 +0200
committerJohn Crispin <blogic@openwrt.org>2013-07-23 12:47:39 +0200
commitba0cb9c1ecc72e6b726deaf91193d24b2a85814a (patch)
treee3eb1d31524d21990ca5ac8619b279d6e9d3bde4 /askfirst.c
parentb5f942d6392b9721b686ec504134e88e55e61cb0 (diff)
downloadunitd-ba0cb9c1ecc72e6b726deaf91193d24b2a85814a.tar
unitd-ba0cb9c1ecc72e6b726deaf91193d24b2a85814a.zip
askfirst: remove superfluous 'close' calls on stdio file descriptors.
'dup2' will do it for us if necessary. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'askfirst.c')
-rw-r--r--askfirst.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/askfirst.c b/askfirst.c
index 2f948f8..9916486 100644
--- a/askfirst.c
+++ b/askfirst.c
@@ -31,10 +31,6 @@ static int redirect_output(const char *dev)
if (fd < 0)
return -1;
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- close(STDERR_FILENO);
-
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);