use non-blocking sockets in worker process

This commit is contained in:
Nikos Mavrogiannopoulos
2014-10-05 22:13:08 +02:00
parent db48e3db07
commit ccd07f96fc
6 changed files with 35 additions and 20 deletions
-15
View File
@@ -68,21 +68,6 @@ unsigned int need_maintenance = 0;
static unsigned int need_children_cleanup = 0;
sigset_t sig_default_set;
static void ms_sleep(unsigned ms)
{
struct timespec tv;
tv.tv_sec = 0;
tv.tv_nsec = ms * 1000 * 1000;
while(tv.tv_nsec >= 1000000000) {
tv.tv_nsec -= 1000000000;
tv.tv_sec++;
}
nanosleep(&tv, NULL);
}
static void add_listener(void *pool, struct listen_list_st *list,
int fd, int family, int socktype, int protocol,
struct sockaddr* addr, socklen_t addr_len)