Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
kqueue: invalidate fd in uv_fs_event_t
Browse files Browse the repository at this point in the history
Invalidate file descriptor when closing `uv_fs_event_t` handle. Note
that `uv__io_stop` is just removing `fd` from `loop->watchers` and not
actually invalidating all consequent events in a `kevent()` results.

fix nodejs/node-v0.x-archive#1101
  • Loading branch information
indutny committed Mar 10, 2014
1 parent 84f3059 commit 9b38c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/unix/kqueue.c
Expand Up @@ -359,10 +359,10 @@ int uv_fs_event_init(uv_loop_t* loop,
void uv__fs_event_close(uv_fs_event_t* handle) {
#if defined(__APPLE__)
if (uv__fsevents_close(handle))
uv__io_stop(handle->loop, &handle->event_watcher, UV__POLLIN);
#else
uv__io_stop(handle->loop, &handle->event_watcher, UV__POLLIN);
#endif /* defined(__APPLE__) */
{
uv__io_close(handle->loop, &handle->event_watcher);
}

uv__handle_stop(handle);

Expand Down

1 comment on commit 9b38c01

@indutny
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue reference is wrong, it is just #1101

Please sign in to comment.