diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-14 00:58:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:21 -0500 |
commit | bf27e58c2f1ce897a222a63bc1771716e90d5672 (patch) | |
tree | 524963e39d683772c3db62943b2d5481b53cc073 | |
parent | ecc54f900fa6aaf1b97ef85b1101cf7badf33cec (diff) | |
download | samba-bf27e58c2f1ce897a222a63bc1771716e90d5672.tar.gz samba-bf27e58c2f1ce897a222a63bc1771716e90d5672.tar.bz2 samba-bf27e58c2f1ce897a222a63bc1771716e90d5672.zip |
r22831: take advantage of EVENT_FD_AUTOCLOSE in the inotify code
(This used to be commit 419ef7393f9208e274745808980e0342e2e65a37)
-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; } |