kern/45291: kevent(2) ignores timeout if nevents == 0

Gregory Bond gnb at
Sun Oct 19 17:45:41 PDT 2003

> 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-

More information about the freebsd-bugs mailing list