mirror of https://github.com/git/git.git
Merge branch 'lw/daemon-log-destination'
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
This commit is contained in:
commit
f9bcd751aa
2
daemon.c
2
daemon.c
|
@ -1459,7 +1459,7 @@ int cmd_main(int argc, const char **argv)
|
||||||
die("base-path '%s' does not exist or is not a directory",
|
die("base-path '%s' does not exist or is not a directory",
|
||||||
base_path);
|
base_path);
|
||||||
|
|
||||||
if (inetd_mode) {
|
if (log_destination != LOG_DESTINATION_STDERR) {
|
||||||
if (!freopen("/dev/null", "w", stderr))
|
if (!freopen("/dev/null", "w", stderr))
|
||||||
die_errno("failed to redirect stderr to /dev/null");
|
die_errno("failed to redirect stderr to /dev/null");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue