joyent/libuv — pull request #1519 by LinuxJedi (2014-10-07 13:03:56+00:00)
Title: unix: don't abort when out of FDs

When using uv_loop_new() and the system is low on FDs an abort will be
triggered due to uv_async_init() failing.

To fix this uv_async_init() has been moved up uv__loop_init() so that
allocations are not done before the FD creation and if the FD creation
fails we return -1. This will gracefully cause uv_loop_new() to fail so
the application can handle it.

Fixes #1510