1 #include "timeoutread.h"
6 int timeoutread(t
,fd
,buf
,len
) int t
; int fd
; char *buf
; int len
;
17 if (select(fd
+ 1,&rfds
,(fd_set
*) 0,(fd_set
*) 0,&tv
) == -1) return -1;
18 if (FD_ISSET(fd
,&rfds
)) return read(fd
,buf
,len
);
20 errno
= error_timeout
;