Date: Tue, 20 Apr 1999 08:51:57 -0700 From: Jason Thorpe <thorpej@nas.nasa.gov> To: Bob Bishop <rb@gid.co.uk> Cc: Graham Wheeler <gram@cdsec.com>, hackers@FreeBSD.ORG Subject: Re: Using select() to implement a delay Message-ID: <199904201551.IAA11637@lestat.nas.nasa.gov>
next in thread | raw e-mail | index | archive | help
On Tue, 20 Apr 1999 11:25:35 +0100
Bob Bishop <rb@gid.co.uk> wrote:
> Most likely your select() is taking a signal; truss might be revealing. You
> should in theory be able to write something along the lines of:
>
> do
> r = select(0, 0, 0, 0, &tv);
> while (r == -1 && errno == EINTR);
>
> but AFAIK tv won't get updated correctly, see the BUGS entry in select(2).
What do you mean "won't get updated correctly"? A const timeval is the
correct behavior :-)
In NetBSD, sleep(3) uses nanosleep(2), and thus doesn't stomp on SIGALARM.
-- Jason R. Thorpe <thorpej@nas.nasa.gov>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904201551.IAA11637>
