libuv/include
Ben Noordhuis 4fe1916926 linux: fix 'two watchers, one path' segfault
Problem: registering two uv_fs_event_t watchers for the same path, then closing
them, caused a segmentation fault. While active, the watchers didn't work right
either, only one would receive events.

Cause: each watcher has a wd (watch descriptor) that's used as its key in a
binary tree. When you call inotify_watch_add() twice with the same path, the
second call doesn't return a new wd - it returns the existing one. That in turn
resulted in the first handle getting ousted from the binary tree, leaving
dangling pointers.

This commit addresses that by storing the watchers in a queue and storing the
queue in the binary tree instead of storing the watchers directly in the tree.

Fixes joyent/node#3789.
2012-07-28 16:31:47 +02:00
..
uv-private linux: fix 'two watchers, one path' segfault 2012-07-28 16:31:47 +02:00
ares_version.h c-ares: upgrade to 1.7.5 2011-09-27 16:04:25 -07:00
ares.h c-ares: upgrade to 1.7.5 2011-09-27 16:04:25 -07:00
uv.h unix: map ENODEV to UV_ENODEV 2012-06-26 17:33:29 +02:00