Bruno Haible writes:
> Here is a series of two proposed patches to provide a workaround.
> Simon, is that OK to commit?
I am back from vacation now. Yes, that looks fine, but I haven't tested
it. Thanks for working on it. It will get tested by me eventually,
after the next --import run.
/Sim
Jim Meyering wrote:
> > select (0, rfds, wfds, xfds, timeout) is supposed to be equivalent to
> > select (0, NULL, NULL, NULL, timeout) and supposed to be equivalent to
> > select (n, NULL, NULL, NULL, timeout) for any n > 0. ...
>
> I agree.
OK, I committed the patch.
Bruno
>
> Jim Meyering wrote:
> > > + /* Interix 3.5 has a bug: it does not support nfds == 0. */
> > > + if (nfds == 0)
> > > +{
> > > + nfds = 1;
> > > + rfds = NULL;
> > > + wfds = NULL;
> > > + xfds = NULL;
> > > +}
> >
> > Did you consider doing the above only when al
Bruno Haible wrote:
> Jim Meyering wrote:
>> > + /* Interix 3.5 has a bug: it does not support nfds == 0. */
>> > + if (nfds == 0)
>> > +{
>> > + nfds = 1;
>> > + rfds = NULL;
>> > + wfds = NULL;
>> > + xfds = NULL;
>> > +}
>>
>> Did you consider doing the above only
Jim Meyering wrote:
> > + /* Interix 3.5 has a bug: it does not support nfds == 0. */
> > + if (nfds == 0)
> > +{
> > + nfds = 1;
> > + rfds = NULL;
> > + wfds = NULL;
> > + xfds = NULL;
> > +}
>
> Did you consider doing the above only when all three input pointers
>
Bruno Haible wrote:
> Simon Josefsson wrote:
>> > It seems that another solution would be to
>> > detect this problem, and to replace select if the system's select
>> > doesn't work.
>
> Good point. Using 0 as nfd argument is common; try searching for
> " = select (0, " on http://www.google.com/cod
Simon Josefsson wrote:
> > It seems that another solution would be to
> > detect this problem, and to replace select if the system's select
> > doesn't work.
Good point. Using 0 as nfd argument is common; try searching for
" = select (0, " on http://www.google.com/codesearch/.
> I haven't studie
> 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.
Simon Josefsson wrote:
> 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 a
> > 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
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
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
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
13 matches
Mail list logo