summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2012-01-07 12:42:46 +0100
committerJunio C Hamano <gitster@pobox.com>2012-01-08 15:08:03 -0800
commitf6a34cfbb4314105c4dadd88eb42da26aef44dfd (patch)
treea128c801eba2c9b7ba5e918c49d90b9b0af17fa2 /daemon.c
parent71039fb9d562731ed700ef072b6fcb18e2478361 (diff)
downloadgit-f6a34cfbb4314105c4dadd88eb42da26aef44dfd.tar.gz
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 <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon.c b/daemon.c
index 15ce918a21..ab21e66b2f 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();