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>
}
if (!strcmp(arg, "--inetd")) {
inetd_mode = 1;
}
if (!strcmp(arg, "--inetd")) {
inetd_mode = 1;
continue;
}
if (!strcmp(arg, "--verbose")) {
continue;
}
if (!strcmp(arg, "--verbose")) {
}
if (!strcmp(arg, "--syslog")) {
log_syslog = 1;
}
if (!strcmp(arg, "--syslog")) {
log_syslog = 1;
- openlog("git-daemon", 0, LOG_DAEMON);
continue;
}
if (!strcmp(arg, "--export-all")) {
continue;
}
if (!strcmp(arg, "--export-all")) {
}
if (!strncmp(arg, "--timeout=", 10)) {
timeout = atoi(arg+10);
}
if (!strncmp(arg, "--timeout=", 10)) {
timeout = atoi(arg+10);
}
if (!strncmp(arg, "--init-timeout=", 15)) {
init_timeout = atoi(arg+15);
}
if (!strncmp(arg, "--init-timeout=", 15)) {
init_timeout = atoi(arg+15);
}
if (!strcmp(arg, "--")) {
ok_paths = &argv[i+1];
}
if (!strcmp(arg, "--")) {
ok_paths = &argv[i+1];
+ if (log_syslog)
+ openlog("git-daemon", 0, LOG_DAEMON);
+
if (inetd_mode) {
fclose(stderr); //FIXME: workaround
if (inetd_mode) {
fclose(stderr); //FIXME: workaround