X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=stat.c;h=7346f097e61e9933759563d64af7e7b2dedd3eb6;hp=e3773df6403fb72d0c5163efa19c2f0ea43f7392;hb=d7cda933daa35663b2b9b61d62cb514afa37fd18;hpb=f2a7b00cf72104a38733b7bf3add9fb19dd71c93 diff --git a/stat.c b/stat.c index e3773df6..7346f097 100644 --- a/stat.c +++ b/stat.c @@ -25,6 +25,7 @@ #include "list.h" #include "error.h" #include "string.h" +#include "fd.h" /** the maximal number of simultaneous connections */ #define MAX_STAT_CLIENTS 50 @@ -161,10 +162,8 @@ void stat_client_write(char *msg, int itemnum) FD_ZERO(&wfds); FD_SET(fd, &wfds); // PARA_DEBUG_LOG("%s: p=%lx\n", __func__, (long)p); - do - ret = select(fd + 1, NULL, &wfds, NULL, &tv); - while (ret < 0 && errno == EINTR); - if (ret) { + ret = para_select(fd + 1, NULL, &wfds, &tv); + if (ret > 0) { ret = write(fd, msg, len); PARA_DEBUG_LOG("dumped %s to fd %d, ret = %d\n", msg, fd, ret); if (ret == len )