Skip to content

Commit f6a34cf

Browse files
Clemens Buchachergitster
authored andcommitted
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>
1 parent 71039fb commit f6a34cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

daemon.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,8 @@ static int serve(struct string_list *listen_addr, int listen_port,
10861086

10871087
drop_privileges(cred);
10881088

1089+
loginfo("Ready to rumble");
1090+
10891091
return service_loop(&socklist);
10901092
}
10911093

@@ -1270,10 +1272,8 @@ int main(int argc, char **argv)
12701272
if (inetd_mode || serve_mode)
12711273
return execute();
12721274

1273-
if (detach) {
1275+
if (detach)
12741276
daemonize();
1275-
loginfo("Ready to rumble");
1276-
}
12771277
else
12781278
sanitize_stdfds();
12791279

0 commit comments

Comments
 (0)