libuv/src
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
..
ares Prepare libuv for shared library build 2011-10-29 00:52:32 +02:00
unix linux: fix 'two watchers, one path' segfault 2012-07-28 16:31:47 +02:00
win windows: don't inhibit reparse behavior when non-symlink is encountered 2012-06-28 05:07:18 +02:00
cares.c Move shared c-ares glue code from uv-common to cares.c 2012-05-22 16:11:23 +02:00
fs-poll.c unix, windows: stat: never pass NULL to cb 2012-06-20 17:56:37 +02:00
uv-common.c unix, windows: add debug mode handle printer 2012-06-06 04:25:12 +02:00
uv-common.h unix, windows: share uv__handle_init() 2012-06-13 01:28:58 +02:00