summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d5e268)
raw | patch | inline | side by side (parent: 8d5e268)
author | Matthias Lederhofer <matled@gmx.net> | |
Thu, 13 Jul 2006 10:02:29 +0000 (12:02 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 14 Jul 2006 04:50:14 +0000 (21:50 -0700) |
Removed the git-daemon prefix from die() because no other call to die
does this.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
does this.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
daemon.c | patch | blob | history |
diff --git a/daemon.c b/daemon.c
index e096bd7ef638273b525848fbe0018863871ea93d..a7636bc50c3d0148adaeaca5e624fcf1ab542d8d 100644 (file)
--- a/daemon.c
+++ b/daemon.c
va_end(params);
}
+static void NORETURN daemon_die(const char *err, va_list params)
+{
+ logreport(LOG_ERR, err, params);
+ exit(1);
+}
+
static int avoid_alias(char *p)
{
int sl, ndot;
usage(daemon_usage);
}
- if (log_syslog)
+ if (log_syslog) {
openlog("git-daemon", 0, LOG_DAEMON);
-
- if (strict_paths && (!ok_paths || !*ok_paths)) {
- if (!inetd_mode)
- die("git-daemon: option --strict-paths requires a whitelist");
-
- logerror("option --strict-paths requires a whitelist");
- exit (1);
+ set_die_routine(daemon_die);
}
+ if (strict_paths && (!ok_paths || !*ok_paths))
+ die("option --strict-paths requires a whitelist");
+
if (inetd_mode) {
struct sockaddr_storage ss;
struct sockaddr *peer = (struct sockaddr *)&ss;