diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-04-20 01:47:31 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-04-20 01:47:31 +0200 |
commit | eee0d5b5fbe703bd34f3b0bd73695b35b2cd7898 (patch) | |
tree | 13d2f048c41067da218b823e71ef551d404c8e3e | |
parent | Be proper qotd daemon. (diff) | |
download | mulder-listen-daemon-eee0d5b5fbe703bd34f3b0bd73695b35b2cd7898.tar.xz mulder-listen-daemon-eee0d5b5fbe703bd34f3b0bd73695b35b2cd7898.zip |
Don't close the fds for nothing.
-rw-r--r-- | mulderd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -94,7 +94,7 @@ int main(int argc, char *argv[]) time_t now; socklen_t connection_addr_len; pid_t child; - int daemonize = 0, option_index = 0, port = 17, connection_file = 0, option; + int daemonize = 0, option_index = 0, port = 17, connection_file = -1, option; char *pid_file = 0, *connection_log = 0, *time_str; FILE *pidfile; @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) perror("daemon"); return EXIT_FAILURE; } - if (!connection_file) { + if (connection_file == -1) { close(STDERR_FILENO); close(STDOUT_FILENO); } |