- changed select to uselect

- some fixes in tecs.c
This commit is contained in:
zolliker
2008-10-16 14:33:25 +00:00
parent 5cb057f645
commit d239d98edb
12 changed files with 50 additions and 17 deletions

18
tecs/uselect.c Normal file
View File

@@ -0,0 +1,18 @@
#include <signal.h>
#include <errno.h>
#include "uselect.h"
/* an uninterruptable version of select. M.Z. Oct 2008 */
int uselect(int nfds,
fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout) {
sigset_t sigmask;
struct timespec tmo;
sigfillset(&sigmask);
tmo.tv_sec = timeout->tv_sec;
tmo.tv_nsec = timeout->tv_usec * 1000;
return pselect(nfds, readfds, writefds, exceptfds, &tmo, &sigmask);
}