Re: [PATCH] compat: Add another rudimentary poll() emulation
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- May 27, 2010, 11:00 UTC
- Message-ID
- <AANLkTikYa2vq4PrKrO2QIkHVxYqbhUZRw42kQq875FNT@mail.gmail.com>
- In-Reply-To
- <20100527101043.GA4390@progeny.tock>
On Thu, May 27, 2010 at 12:10 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Implement the subset of poll() semantics needed by git in terms of > select(), for use by the Interix port. Inspired by commit 6ed807f > (Windows: A rudimentary poll() emulation, 2007-12-01). >
A possible problem with this approach is that the maximum number of file descriptors poll can handle limited by RLIMIT_NOFILE, whereas the maximum number of file descriptors select can handle is limited by FD_SETSIZE.
I don't think this is a big problem in reality, though - both values seem to be pretty high in most implementations. And IIRC git-daemon is the only one who needs more than 2, and it doesn't even check RLIMIT_NOFILE.
If we decide to go this route, perhaps it'd make sense to change to this code for Windows also? Our Windows-implementation of poll() has some annoying limitations...
-- Erik "kusma" Faye-Lund