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>maint
parent
71039fb9d5
commit
f6a34cfbb4
6
daemon.c
6
daemon.c
|
@ -1086,6 +1086,8 @@ static int serve(struct string_list *listen_addr, int listen_port,
|
||||||
|
|
||||||
drop_privileges(cred);
|
drop_privileges(cred);
|
||||||
|
|
||||||
|
loginfo("Ready to rumble");
|
||||||
|
|
||||||
return service_loop(&socklist);
|
return service_loop(&socklist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,10 +1272,8 @@ int main(int argc, char **argv)
|
||||||
if (inetd_mode || serve_mode)
|
if (inetd_mode || serve_mode)
|
||||||
return execute();
|
return execute();
|
||||||
|
|
||||||
if (detach) {
|
if (detach)
|
||||||
daemonize();
|
daemonize();
|
||||||
loginfo("Ready to rumble");
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
sanitize_stdfds();
|
sanitize_stdfds();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue