projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Portability fix for Solaris 10/x86
[git.git]
/
daemon.c
diff --git
a/daemon.c
b/daemon.c
index
eeff9e7
..
fb3f25c
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>
@@
-71,13
+72,13
@@
static int max_connections = 25;
/* These are updated by the signal handler */
static volatile unsigned int children_reaped = 0;
/* These are updated by the signal handler */
static volatile unsigned int children_reaped = 0;
-pid_t dead_child[MAX_CHILDREN];
+
static
pid_t dead_child[MAX_CHILDREN];
/* These are updated by the main loop */
static unsigned int children_spawned = 0;
static unsigned int children_deleted = 0;
/* These are updated by the main loop */
static unsigned int children_spawned = 0;
static unsigned int children_deleted = 0;
-struct child {
+st
atic st
ruct child {
pid_t pid;
socklen_t addrlen;
struct sockaddr_storage address;
pid_t pid;
socklen_t addrlen;
struct sockaddr_storage address;
@@
-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;
}