diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-14 07:11:27 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-14 07:11:27 +0000 |
commit | cc5502a4d01bfc4946fbd198aad75ea03e9734d3 (patch) | |
tree | 0f2ed7048c5c403f8bf90e3e259d7aa907f2cc3c /source3/smbd/notify_kernel.c | |
parent | 1896c721fbd01b6d1f95b05350010c17fccbf612 (diff) | |
download | samba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.tar.gz samba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.tar.bz2 samba-cc5502a4d01bfc4946fbd198aad75ea03e9734d3.zip |
allow the notify implementation to choose the select timeout change
(This used to be commit b1441d9622609af5ef598c5e1e1f5af438dc0731)
Diffstat (limited to 'source3/smbd/notify_kernel.c')
-rw-r--r-- | source3/smbd/notify_kernel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c index c7fb5ca0dd..a7d4591cc9 100644 --- a/source3/smbd/notify_kernel.c +++ b/source3/smbd/notify_kernel.c @@ -167,7 +167,7 @@ static BOOL kernel_notify_available(void) if (fd == -1) return False; /* uggh! */ ret = fcntl(fd, F_NOTIFY, 0); close(fd); - return ret == 0 || errno != EINVAL; + return ret == 0; } @@ -179,8 +179,6 @@ struct cnotify_fns *kernel_notify_init(void) static struct cnotify_fns cnotify; struct sigaction act; - if (!kernel_notify_available()) return NULL; - act.sa_handler = NULL; act.sa_sigaction = signal_handler; act.sa_flags = SA_SIGINFO; @@ -189,9 +187,12 @@ struct cnotify_fns *kernel_notify_init(void) return NULL; } + if (!kernel_notify_available()) return NULL; + cnotify.register_notify = kernel_register_notify; cnotify.check_notify = kernel_check_notify; cnotify.remove_notify = kernel_remove_notify; + cnotify.select_time = -1; return &cnotify; } |