summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-04-20 01:47:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2013-04-20 01:47:31 +0200
commiteee0d5b5fbe703bd34f3b0bd73695b35b2cd7898 (patch)
tree13d2f048c41067da218b823e71ef551d404c8e3e
parentBe proper qotd daemon. (diff)
downloadmulder-listen-daemon-eee0d5b5fbe703bd34f3b0bd73695b35b2cd7898.tar.xz
mulder-listen-daemon-eee0d5b5fbe703bd34f3b0bd73695b35b2cd7898.zip
Don't close the fds for nothing.
-rw-r--r--mulderd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mulderd.c b/mulderd.c
index 2c06b18..a804e69 100644
--- a/mulderd.c
+++ b/mulderd.c
@@ -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);
}