X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=6286806013471ea55278593d0cbf2de74f8934b7;hp=d738c3d99f1143648f98f0b65b714bbf1e69ccee;hb=8dab386f;hpb=6668ac4a8c7f2a92efb9e6d405d954beff77d230 diff --git a/afs.c b/afs.c index d738c3d9..62868060 100644 --- a/afs.c +++ b/afs.c @@ -930,14 +930,11 @@ static void command_post_select(struct sched *s, struct task *t) free(client); } /* Accept connections on the local socket. */ - if (!FD_ISSET(ct->fd, &s->rfds)) - return; - ret = para_accept(ct->fd, &unix_addr, sizeof(unix_addr)); - if (ret < 0) { + ret = para_accept(ct->fd, &s->rfds, &unix_addr, sizeof(unix_addr), &fd); + if (ret < 0) PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); + if (ret <= 0) return; - } - fd = ret; ret = mark_fd_nonblocking(fd); if (ret < 0) { PARA_NOTICE_LOG("%s\n", para_strerror(-ret));