[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH v2] compat: Add another rudimentary poll() emulation
From:       Albert Dvornik <dvornik+git () gmail ! com>
Date:       2010-05-31 13:10:18
Message-ID: AANLkTimJXEg08AlDIbPYsRZFXSDFPhN1SB6OxMyaM5PE () mail ! gmail ! com
[Download RAW message or body]

On Mon, May 31, 2010 at 8:46 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Albert Dvornik wrote:
>
>> For the general case, you'd want
>>        tv.tv_sec = timeout / 1000;
>>        tv.tv_usec = 1000 * (timeout % 1000);
>
> Thanks for the catch.  Actually, it is not so unlikely that someone
> would ask the autocorrect to wait longer than a second.

Good point, I take back what I said. =)

> On Linux this is not an issue, but maybe Interix cares.  Posix is
> vague and only says "the timeout period is given in seconds and
> microseconds", staying silent on what the range of valid values is.

Some traditional UNIXes are actually picky about the usec range, or at
least used to be (I seem to recall BSD and/or Solaris, but I really
don't remember for sure, this was a long time ago).

--bert
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic