projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust .gitignore for big rename.
[git.git]
/
daemon.c
diff --git
a/daemon.c
b/daemon.c
index
b7d6091
..
24bac16
100644
(file)
--- a/
daemon.c
+++ b/
daemon.c
@@
-3,6
+3,7
@@
#include <signal.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netdb.h>
#include <netinet/in.h>
@@
-294,8
+295,11
@@
static int serve(int port)
fds = fds_init;
if (select(maxfd + 1, &fds, NULL, NULL, NULL) < 0) {
fds = fds_init;
if (select(maxfd + 1, &fds, NULL, NULL, NULL) < 0) {
- error("select failed, resuming: %s", strerror(errno));
- sleep(1);
+ if (errno != EINTR) {
+ error("select failed, resuming: %s",
+ strerror(errno));
+ sleep(1);
+ }
continue;
}
continue;
}
@@
-349,8
+353,10
@@
int main(int argc, char **argv)
usage(daemon_usage);
}
usage(daemon_usage);
}
- if (inetd_mode)
+ if (inetd_mode) {
+ fclose(stderr); //FIXME: workaround
return execute();
return execute();
+ }
return serve(port);
}
return serve(port);
}