From 90bde5e5695df822dd3c236f8b26902aa9564cff Mon Sep 17 00:00:00 2001 From: sanjiyan Date: Fri, 7 Nov 2003 22:11:30 +0000 Subject: [PATCH] reset the timer in the correct way. --- io/io_tryread.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/io/io_tryread.c b/io/io_tryread.c index 0c35bcc..2bbcb12 100644 --- a/io/io_tryread.c +++ b/io/io_tryread.c @@ -29,11 +29,7 @@ int64 io_tryread(int64 d,char* buf,int64 len) { } r=read(d,buf,len); if (!e->nonblock) { - new.it_interval.tv_usec=0; - new.it_interval.tv_sec=0; - new.it_value.tv_usec=0; - new.it_value.tv_sec=0; - setitimer(ITIMER_REAL,&new,&old); + setitimer(ITIMER_REAL,&old,0); } if (r==-1) { if (errno==EINTR) errno=EAGAIN;