From: Clemens Buchacher Date: Sat, 7 Jan 2012 11:42:46 +0000 (+0100) Subject: git-daemon: produce output when ready X-Git-Tag: v1.7.10-rc0~149^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f6a34cfbb4314105c4dadd88eb42da26aef44dfd;p=git.git git-daemon: produce output when ready If a client tries to connect after git-daemon starts, but before it opens a listening socket, the connection will fail. Output "[PID] Ready to rumble]" after opening the socket successfully in order to inform the user that the daemon is now ready to receive connections. Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- diff --git a/daemon.c b/daemon.c index 15ce918a2..ab21e66b2 100644 --- a/daemon.c +++ b/daemon.c @@ -1086,6 +1086,8 @@ static int serve(struct string_list *listen_addr, int listen_port, drop_privileges(cred); + loginfo("Ready to rumble"); + return service_loop(&socklist); } @@ -1270,10 +1272,8 @@ int main(int argc, char **argv) if (inetd_mode || serve_mode) return execute(); - if (detach) { + if (detach) daemonize(); - loginfo("Ready to rumble"); - } else sanitize_stdfds();