summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbba222)
raw | patch | inline | side by side (parent: fbba222)
author | Andreas Ericsson <exon@op5.se> | |
Wed, 16 Nov 2005 23:38:29 +0000 (00:38 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 17 Nov 2005 04:34:26 +0000 (20:34 -0800) |
Allow --init-timeout and --timeout to be specified without falling
through to usage().
Make sure openlog() is called even if implied by --inetd, or messages
will be sent to wherever LOG_USER ends up.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
through to usage().
Make sure openlog() is called even if implied by --inetd, or messages
will be sent to wherever LOG_USER ends up.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
daemon.c | patch | blob | history |
diff --git a/daemon.c b/daemon.c
index e18475229885d28b39970f9619d0e89d66a8199b..2b81152d7145c796374ec35d4c61676da42cb992 100644 (file)
--- a/daemon.c
+++ b/daemon.c
}
if (!strcmp(arg, "--inetd")) {
inetd_mode = 1;
+ log_syslog = 1;
continue;
}
if (!strcmp(arg, "--verbose")) {
}
if (!strcmp(arg, "--syslog")) {
log_syslog = 1;
- openlog("git-daemon", 0, LOG_DAEMON);
continue;
}
if (!strcmp(arg, "--export-all")) {
}
if (!strncmp(arg, "--timeout=", 10)) {
timeout = atoi(arg+10);
+ continue;
}
if (!strncmp(arg, "--init-timeout=", 15)) {
init_timeout = atoi(arg+15);
+ continue;
}
if (!strcmp(arg, "--")) {
ok_paths = &argv[i+1];
usage(daemon_usage);
}
+ if (log_syslog)
+ openlog("git-daemon", 0, LOG_DAEMON);
+
if (inetd_mode) {
fclose(stderr); //FIXME: workaround
- log_syslog = 1;
return execute();
}