Markus Duft wrote:
> Hi!
>
> I have a more or less trivial patch for the nanosleep replacement for
> interix. The problem I ran into is, that select() has a bug, making it fail
> with "bad address" if the number of fd's to select on is zero. Setting the
> set-size to 1 solves the problem, and should not damage anything else around
> there, since all the sets are NULL anyway.
>
> The patch can be found here:
>http://tinderbox.dev.gentoo.org/portage-prefix/sys-apps/coreutils/files/coreutils-6.12-interix-sleep.patch
>
> If you need more info, please contact me.
>
> Cheers, Markus Duft
That looks fine as the first param to select
is the highest-numbered file descriptor + 1.
Arguably 1 is more correct than 0.
Note this function is now part of gnulib (CCd).
cheers,
Pádraig.