From ba0cb9c1ecc72e6b726deaf91193d24b2a85814a Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 23 Jul 2013 16:28:38 +0800 Subject: [PATCH] askfirst: remove superfluous 'close' calls on stdio file descriptors. 'dup2' will do it for us if necessary. Signed-off-by: Yousong Zhou --- askfirst.c | 4 ---- 1 file changed, 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); -- 2.11.0