summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-16 21:32:44 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-16 21:32:44 -0800
commit27dedf0c3b78d1072fb5449149421284f9e5297b (patch)
tree80da2302f50bb1f396611a4a54a6da52a4592bd0 /daemon.c
parent60d64db4614b1007ca37c228923ec1964d5ad394 (diff)
downloadgit-27dedf0c3b78d1072fb5449149421284f9e5297b.tar.gz
GIT 0.99.9j aka 1.0rc3v1.0rc3v0.99.9j
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/daemon.c b/daemon.c
index c3f86410d4..2b81152d71 100644
--- a/daemon.c
+++ b/daemon.c
@@ -594,6 +594,7 @@ int main(int argc, char **argv)
}
if (!strcmp(arg, "--inetd")) {
inetd_mode = 1;
+ log_syslog = 1;
continue;
}
if (!strcmp(arg, "--verbose")) {
@@ -602,7 +603,6 @@ int main(int argc, char **argv)
}
if (!strcmp(arg, "--syslog")) {
log_syslog = 1;
- openlog("git-daemon", 0, LOG_DAEMON);
continue;
}
if (!strcmp(arg, "--export-all")) {
@@ -611,9 +611,11 @@ int main(int argc, char **argv)
}
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];
@@ -626,10 +628,13 @@ int main(int argc, char **argv)
usage(daemon_usage);
}
+ if (log_syslog)
+ openlog("git-daemon", 0, LOG_DAEMON);
+
if (inetd_mode) {
fclose(stderr); //FIXME: workaround
return execute();
- } else {
- return serve(port);
}
+
+ return serve(port);
}