usec is microseconds. select will wait for 1/1000 of a second and if it timed out (and got back -1 and an EAGAIN errno) it will return w/o doing anything. read the select man page.
if you are sure that read_buffer() does not return then I guess there is something seriously wrong with your glibc implementation. what are you running this on ?
 
--
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]
 
+972-9-9581711 (116)
+972-67-340014
 
::..
The most exciting phrase to hear in science, the one that heralds new discoveries,
 is not "Eureka!" but "hm... that's funny..."
 -- Isaac Asimov
 

-----Original Message-----
From: Andrea Viscovich [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 24, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: tv_sec on smsc_at2

In

void at2_read_buffer

tv.tv_sec = 0;

tv.tv_usec = 1000;

ret = select(privdata->fd + 1, &read_fd, NULL, NULL, &tv);

If I disconnect modem from serial the above select does not

return anything, at least in the 2 hours I waited :-)

So I'm wondering if anybody knows if we should change tv.tv_usec

to something else than 1000 (seconds, minutes or what is this usec?)

Thanks

Andrea

Reply via email to