bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'select' on MS-Windows returns without waiting for pipes


From: Eli Zaretskii
Subject: Re: 'select' on MS-Windows returns without waiting for pipes
Date: Tue, 10 Jun 2014 05:47:09 +0300

> Date: Tue, 10 Jun 2014 00:55:14 +0100
> From: Pádraig Brady <address@hidden>
> CC: address@hidden
> 
> > +  /* How much is left to wait?  */
> > +  if (wait_timeout != INFINITE)
> > +    {
> > +      wait_timeout = tend - clock ();
> > +      if (wait_timeout < 0)
> > +   wait_timeout = 0;
> 
> Strange indenting here.

Wasn't there a TAB there?

> More importantly DWORD is an unsigned type according to a quick search,
> so the < 0 check is incorrect?

Right you are.  So this should be something like

  clock_t tnow = clock ();
  if (tend >= tnow)
    wait_timeout = tend - tnow;
  else
    wait_timeout = 0;

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]