Skip to content

Commit

Permalink
Merge branch 'lw/daemon-log-destination'
Browse files Browse the repository at this point in the history
Recent introduction of "--log-destination" option to "git daemon"
did not work well when the daemon was run under "--inetd" mode.

* lw/daemon-log-destination:
  daemon.c: fix condition for redirecting stderr
  • Loading branch information
gitster committed Apr 25, 2018
2 parents f8fbcd6 + e67d906 commit f9bcd75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon.c
Expand Up @@ -1459,7 +1459,7 @@ int cmd_main(int argc, const char **argv)
die("base-path '%s' does not exist or is not a directory",
base_path);

if (inetd_mode) {
if (log_destination != LOG_DESTINATION_STDERR) {
if (!freopen("/dev/null", "w", stderr))
die_errno("failed to redirect stderr to /dev/null");
}
Expand Down

0 comments on commit f9bcd75

Please sign in to comment.