There is no need to keep null_fd open once
it has been used by the three dup2() calls.
---
lib/daemon.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/daemon.c b/lib/daemon.c
index c3f3535..e084efb 100644
--- a/lib/daemon.c
+++ b/lib/daemon.c
@@ -407,6 +407,7 @@ close_standard_fds(void)
dup2(null_fd, STDIN_FILENO);
dup2(null_fd, STDOUT_FILENO);
dup2(null_fd, STDERR_FILENO);
+ close(null_fd);
}
/* Disable logging to stderr to avoid wasting CPU time. */
--
1.7.5.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev