RE: interix 3.5 select bug

2009-03-11 Thread Markus Duft
> Pádraig Brady wrote: > > Markus Duft wrote: [snip] > > Thanks for looking at that, Pádraig. > I agree. > > Note that there are other uses of select with 0 as first argument. > These affect the poll ans select modules: > > $ git grep -l 'select (0' > lib/poll.c > lib/winsock-select.

Re: interix 3.5 select bug

2009-03-11 Thread Paolo Bonzini
> > That looks fine as the first param to select > > is the highest-numbered file descriptor + 1. > > Arguably 1 is more correct than 0. I think this patch is fine. OTOH 1 is *not* more correct than 0, because it implies that fd 0 might be tested. The other uses are for WinSock only, so they sh

Re: interix 3.5 select bug

2009-03-11 Thread Simon Josefsson
Jim Meyering writes: > + * lib/nanosleep.c (my_usleep): Use 1, not 0, as the first argument. > + This avoids a failure on Interix 3.5. Details in > + http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16077 Is this the best solution? It seems that another solution would be to de

Re: interix 3.5 select bug

2009-03-11 Thread Jim Meyering
Pádraig Brady wrote: > 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

Re: interix 3.5 select bug

2009-03-11 Thread Pádraig Brady
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 shou

interix 3.5 select bug

2009-03-10 Thread Markus Duft
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 aro