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>
Clemens Buchacher committed
Jan 7, 2012 at 12:42 UTC
f6a34cfbb4314105c4dadd88eb42da26aef44dfd
1 file changed
+3
-3
daemon.c
+3
-3
@@ -1086,6 +1086,8 @@ static int serve(struct string_list *listen_addr, int listen_port,
1086
1087
drop_privileges(cred);
1088
1089
+ loginfo("Ready to rumble");
1090
+
1091
return service_loop(&socklist);
1092
}
1093
@@ -1270,10 +1272,8 @@ int main(int argc, char **argv)
1272
if (inetd_mode || serve_mode)
1273
return execute();
1274
1273
- if (detach) {
1275
+ if (detach)
1276
daemonize();
1275
- loginfo("Ready to rumble");
1276
- }
1277
else
1278
sanitize_stdfds();
1279