libuv/include/uv-private
Ben Noordhuis 4f5c8da191 unix: reimplement accept() EMFILE trick
Implement a best effort approach to mitigating accept() EMFILE errors.

We have a spare file descriptor stashed away that we close to get below
the EMFILE limit. Next, we accept all pending connections and close them
immediately to signal the clients that we're overloaded - and we are, but
we still keep on trucking.

There is one caveat: it's not reliable in a multi-threaded environment.
The file descriptor limit is per process. Our party trick fails if another
thread opens a file or creates a socket in the time window between us
calling close() and accept().

Fixes #315.
2012-09-10 22:12:30 +02:00
..
eio.h Allow headers to be included with -Werror and -Wundef 2012-08-09 01:09:09 +02:00
ev.h unix: fix event loop stall 2012-06-06 05:12:28 +02:00
ngx-queue.h Allow headers to be included with -Werror and -Wundef 2012-08-09 01:09:09 +02:00
tree.h Rename __unused to UV__UNUSED. 2012-04-03 17:41:50 +02:00
uv-bsd.h freebsd: fix build breakage introduced in 3b69c0f 2012-08-29 22:27:27 +02:00
uv-darwin.h unix: use select() for specific fds on OS X 2012-08-20 23:35:13 +02:00
uv-linux.h unix: split up uv-unix.h 2012-08-17 16:42:31 +02:00
uv-sunos.h unix: split up uv-unix.h 2012-08-17 16:42:31 +02:00
uv-unix.h unix: reimplement accept() EMFILE trick 2012-09-10 22:12:30 +02:00
uv-win.h windows: fix the MinGW build 2012-08-23 23:50:03 +02:00