diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2013-07-23 10:28:38 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-07-23 12:47:39 +0200 |
commit | ba0cb9c1ecc72e6b726deaf91193d24b2a85814a (patch) | |
tree | e3eb1d31524d21990ca5ac8619b279d6e9d3bde4 | |
parent | b5f942d6392b9721b686ec504134e88e55e61cb0 (diff) | |
download | unitd-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>
-rw-r--r-- | askfirst.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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); |