git-daemon: call logerror() instead of error()
Use logerror(), not error(), so that the messages won't be lost, especially when running the daemon with its log sent to the syslog facility. Signed-off-by: Stephen R. van den Berg <srb@cuci.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stephen R. van den Berg committed
Aug 14, 2008 at 20:02 UTC
df0daf8ac0fce4bb98d5aff9295535a1606d2fad
1 file changed
+2
-2
daemon.c
+2
-2
@@ -836,7 +836,7 @@ static int socksetup(char *listen_addr, int listen_port, int **socklist_p)
836
if (sockfd < 0)
837
continue;
838
if (sockfd >= FD_SETSIZE) {
839
- error("too large socket descriptor.");
839
+ logerror("Socket descriptor too large");
840
close(sockfd);
841
continue;
842
}
@@ -955,7 +955,7 @@ static int service_loop(int socknum, int *socklist)
955
956
if (poll(pfd, socknum + 1, -1) < 0) {
957
if (errno != EINTR) {
958
- error("poll failed, resuming: %s",
958
+ logerror("Poll failed, resuming: %s",
959
strerror(errno));
960
sleep(1);
961
}