joyent/libuv — pull request #894 by indutny (2013-08-21 08:14:42+00:00)
Title: fsevents: use shared FSEventStream

It seems that number of simultaneously opened FSEventStreams is limited
on OSX (i.e. you can have only fixed number of them on one running
system), getting past through this limit will cause `FSEventStreamCreate` to
return false and write following message to stderr:

(CarbonCore.framework) FSEventStreamStart: register_with_server: ERROR:
f2d_register_rpc() => (null) (-21)

To prevent this, we must use only one shared FSEventStream with a paths for
all uv_fsevent_t handles, and then filter out events for each handle
using this paths again.

See https://github.com/joyent/node/issues/5463