Date: Mon, 20 Oct 2003 10:45:12 +1000 From: Gregory Bond <gnb@itga.com.au> To: John Polstra <jdp@polstra.com> Cc: John-Mark Gurney <gurney_j@efn.org> Subject: Re: kern/45291: kevent(2) ignores timeout if nevents == 0 Message-ID: <200310200045.KAA22822@lightning.itga.com.au> In-Reply-To: Your message of Sun, 19 Oct 2003 10:38:36 -0700.
index | next in thread | raw e-mail
> They absolutely rely on this behavior of select. If anybody changed
> it they'd have a whole lot of broken programs on their hands. You may
> view it as a case of lazy programmers using the wrong system call for
> sleeping, but in fact it is just the proper and most sensible behavior
> for select to have at this boundary condition.
It's not just lazy either. Up to and including 4.2 BSD, the _only_ way to get
sub-second sleeps was to use select() with no FDs. SysV / AT&T varients
couldn't do it at all. nanosleep() is a much later addition.
Even Solaris 2.6/2.8 has this in the nanosleep man page:
ENOSYS nanosleep() is not supported by this implementa-
tion.
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310200045.KAA22822>
