Thread (39 messages) flat view 39 messages, 14 authors, 2016-06-15

Re: [msysGit] Re: [PATCH] compat: Add another rudimentary poll() emulation

From: Albert Dvornik <hidden>
Date: 2016-06-15 22:48:52

On Thu, May 27, 2010 at 8:57 AM, Erik Faye-Lund
[off-list ref] wrote:
On Thu, May 27, 2010 at 2:36 PM, Marko Kreen [off-list ref] wrote:
[...]
quoted
Hm, good catch.  Seems such compat poll() cannot be done without
OS-specific hacks.
Perhaps getrlimit() could overridden to return FD_SETSIZE for both the
soft and hard limit when asking about RLIMIT_NOFILE? In such cases,
anyone who passes nfds above FD_SETSIZE hasn't consulted
RLIMIT_NOFILE, and should be outside the standard. But your point
might have been about a limitless poll()-implementation, like the code
you linked tried to achieve. In that context, no. I doubt it's
possible to do in a robust fashion.
This is getting far off-topic, but I do think it's possible to do in a
robust fashion if you are willing to sacrifice some performance [i.e.
we should not consider this for Git =) ], by creating multiple fd_set
structures and only shoving up to FD_SETSIZE descriptors into each.
Cycling between the structures would cause some extra latency and a
LOT more code complexity, but it should work.

--bert
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help