{"thread":{"id":"12309","subject":"[PATCH 1/2] daemon: send more error messages to the syslog","startedAt":"2008-02-25T13:25:20Z","lastAt":"2008-02-25T19:02:45Z","messageCount":2,"participants":["Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"69882","messageId":"47C2C1C0.5070903@viscovery.net","threadId":"12309","inReplyTo":null,"subject":"[PATCH 1/2] daemon: send more error messages to the syslog","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-02-25T13:25:20Z","receivedAt":"2008-02-25T13:25:20Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"There were a number of die() calls before the syslog was opened; hence,\nthese error messages would have been sent to /dev/null in detached mode.\nNow we install the daemon-specific die routine before any error message is\ngenerated so that these messages go to the syslog.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n daemon.c |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/daemon.c b/daemon.c\nindex 41a60af..dd0177f 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -1149,6 +1149,11 @@ int main(int argc, char **argv)\n \t\tusage(daemon_usage);\n \t}\n\n+\tif (log_syslog) {\n+\t\topenlog(\"git-daemon\", 0, LOG_DAEMON);\n+\t\tset_die_routine(daemon_die);\n+\t}\n+\n \tif (inetd_mode && (group_name || user_name))\n \t\tdie(\"--user and --group are incompatible with --inetd\");\n\n@@ -1176,11 +1181,6 @@ int main(int argc, char **argv)\n \t\t}\n \t}\n\n-\tif (log_syslog) {\n-\t\topenlog(\"git-daemon\", 0, LOG_DAEMON);\n-\t\tset_die_routine(daemon_die);\n-\t}\n-\n \tif (strict_paths && (!ok_paths || !*ok_paths))\n \t\tdie(\"option --strict-paths requires a whitelist\");\n\n-- \n1.5.4.3.229.g5c72\n"},{"id":"69904","messageId":"7v3argkgfe.fsf@gitster.siamese.dyndns.org","threadId":"12309","inReplyTo":"47C2C1C0.5070903@viscovery.net","subject":"Re: [PATCH 1/2] daemon: send more error messages to the syslog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-25T19:02:45Z","receivedAt":"2008-02-25T19:02:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n> There were a number of die() calls before the syslog was opened; hence,\n> these error messages would have been sent to /dev/null in detached mode.\n> Now we install the daemon-specific die routine before any error message is\n> generated so that these messages go to the syslog.\n\nMakes sense.  Thanks.\n"}]}