X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=2afb6db58de95906ba9bbd19f52a79ce054ae59d;hp=71aeaf1ce725209c4a39f0506d1d41169999c0e4;hb=8dab386f;hpb=eecc102ad0abeb0335fe994bb72031a15b9090d7 diff --git a/server.c b/server.c index 71aeaf1c..2afb6db5 100644 --- a/server.c +++ b/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2009 Andre Noll + * Copyright (C) 1997-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -366,12 +366,9 @@ static void command_post_select(struct sched *s, struct task *t) pid_t child_pid; uint32_t *chunk_table; - if (!FD_ISSET(sct->listen_fd, &s->rfds)) - return; - ret = para_accept(sct->listen_fd, NULL, 0); - if (ret < 0) + ret = para_accept(sct->listen_fd, &s->rfds, NULL, 0, &new_fd); + if (ret <= 0) goto out; - new_fd = ret; peer_name = remote_name(new_fd); PARA_INFO_LOG("got connection from %s, forking\n", peer_name); mmd->num_connects++;