diff options
Diffstat (limited to 'source4/ntvfs/sysdep/inotify.c')
-rw-r--r-- | source4/ntvfs/sysdep/inotify.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c index fbbf6e4010..cc612d8f9a 100644 --- a/source4/ntvfs/sysdep/inotify.c +++ b/source4/ntvfs/sysdep/inotify.c @@ -80,16 +80,6 @@ struct inotify_watch_context { /* - destroy the inotify private context -*/ -static int inotify_destructor(struct inotify_private *in) -{ - close(in->fd); - return 0; -} - - -/* see if a particular event from inotify really does match a requested notify event in SMB */ @@ -271,10 +261,9 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx) in->watches = NULL; ctx->private_data = in; - talloc_set_destructor(in, inotify_destructor); /* add a event waiting for the inotify fd to be readable */ - event_add_fd(ctx->ev, in, in->fd, EVENT_FD_READ, inotify_handler, in); + event_add_fd(ctx->ev, in, in->fd, EVENT_FD_READ|EVENT_FD_AUTOCLOSE, inotify_handler, in); return NT_STATUS_OK; } |