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. |
||
|---|---|---|
| .. | ||
| uv-private | ||
| ares_version.h | ||
| ares.h | ||
| uv.h | ||