From: Yousong Zhou Date: Tue, 23 Jul 2013 08:28:38 +0000 (+0800) Subject: askfirst: remove superfluous 'close' calls on stdio file descriptors. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ba0cb9c1ecc72e6b726deaf91193d24b2a85814a;p=project%2Fprocd.git askfirst: remove superfluous 'close' calls on stdio file descriptors. 'dup2' will do it for us if necessary. Signed-off-by: Yousong Zhou --- 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);