reset the timer in the correct way.

master
sanjiyan 21 years ago
parent 5e892205bf
commit 90bde5e569

@ -29,11 +29,7 @@ int64 io_tryread(int64 d,char* buf,int64 len) {
} }
r=read(d,buf,len); r=read(d,buf,len);
if (!e->nonblock) { if (!e->nonblock) {
new.it_interval.tv_usec=0; setitimer(ITIMER_REAL,&old,0);
new.it_interval.tv_sec=0;
new.it_value.tv_usec=0;
new.it_value.tv_sec=0;
setitimer(ITIMER_REAL,&new,&old);
} }
if (r==-1) { if (r==-1) {
if (errno==EINTR) errno=EAGAIN; if (errno==EINTR) errno=EAGAIN;

Loading…
Cancel
Save