projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5f942d
)
askfirst: remove superfluous 'close' calls on stdio file descriptors.
author
Yousong Zhou
<yszhou4tech@gmail.com>
Tue, 23 Jul 2013 08:28:38 +0000
(16:28 +0800)
committer
John Crispin
<blogic@openwrt.org>
Tue, 23 Jul 2013 10:47:39 +0000
(12:47 +0200)
'dup2' will do it for us if necessary.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
askfirst.c
patch
|
blob
|
history
diff --git
a/askfirst.c
b/askfirst.c
index 2f948f8b30a7117ed306015f15754043f8157858..99164862e868e54eff2732e128213723b02658c3 100644
(file)
--- 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);