X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=23b89b5d35a19f0641ca0e506c1be34c2e4eab49;hp=c3099f2c7c0ef06162ec25044646290f0e014c1e;hb=e7b6f442b4edeaeeb885d171df8267fe15aff472;hpb=a3c27f324e4de20322a90ac9a8625d0d87797ff8 diff --git a/fd.c b/fd.c index c3099f2c..23b89b5d 100644 --- a/fd.c +++ b/fd.c @@ -445,18 +445,14 @@ int para_munmap(void *start, size_t length) int write_ok(int fd) { - struct timeval tv = {0, 0}; + struct timeval tv; fd_set wfds; - int ret; -again: + FD_ZERO(&wfds); FD_SET(fd, &wfds); tv.tv_sec = 0; tv.tv_usec = 0; - ret = select(fd + 1, NULL, &wfds, NULL, &tv); - if (ret < 0 && errno == EINTR) - goto again; - return ret; + return para_select(fd + 1, NULL, &wfds, &tv); } /**