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: Pádraig Brady
Subject: Re: 'select' on MS-Windows returns without waiting for pipes
Date: Tue, 10 Jun 2014 23:53:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 06/10/2014 03:47 AM, Eli Zaretskii wrote:
>> 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;

Pushed the attached, thanks.

Pádraig.

Attachment: gnulib-select-pipe.patch
Description: Text Data


reply via email to

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