Skip to content

Commit

Permalink
git-daemon: call logerror() instead of error()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen R. van den Berg authored and Junio C Hamano committed Aug 18, 2008
1 parent 2ebc02d commit df0daf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static int socksetup(char *listen_addr, int listen_port, int **socklist_p)
if (sockfd < 0)
continue;
if (sockfd >= FD_SETSIZE) {
error("too large socket descriptor.");
logerror("Socket descriptor too large");
close(sockfd);
continue;
}
Expand Down Expand Up @@ -955,7 +955,7 @@ static int service_loop(int socknum, int *socklist)

if (poll(pfd, socknum + 1, -1) < 0) {
if (errno != EINTR) {
error("poll failed, resuming: %s",
logerror("Poll failed, resuming: %s",
strerror(errno));
sleep(1);
}
Expand Down

0 comments on commit df0daf8

Please sign in to comment.