Fix from Steve G <linux_4ever@yahoo.com>. Ensure sigemptyset is called on
authorJeremy Allison <jra@samba.org>
Thu, 15 May 2003 17:37:52 +0000 (17:37 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 15 May 2003 17:37:52 +0000 (17:37 +0000)
the sa_mask to prevent valgrind complaints.
Jeremy.
(This used to be commit e065c3a58f5c7f2612596574046a73869183dbd3)

source3/smbd/notify_kernel.c
source3/smbd/oplock_linux.c

index efe93de5afb056d35b2d7ecae739d9245ec903b2..8fcc18a09f9645264099d1b03f862971fdfaee46 100644 (file)
@@ -217,13 +217,14 @@ struct cnotify_fns *kernel_notify_init(void)
 
        ZERO_STRUCT(act);
 
-        act.sa_handler = NULL;
-        act.sa_sigaction = signal_handler;
-        act.sa_flags = SA_SIGINFO;
-        if (sigaction(RT_SIGNAL_NOTIFY, &act, NULL) != 0) {
+       act.sa_handler = NULL;
+       act.sa_sigaction = signal_handler;
+       act.sa_flags = SA_SIGINFO;
+       sigemptyset( &act.sa_mask );
+       if (sigaction(RT_SIGNAL_NOTIFY, &act, NULL) != 0) {
                DEBUG(0,("Failed to setup RT_SIGNAL_NOTIFY handler\n"));
                return NULL;
-        }
+       }
 
        if (!kernel_notify_available())
                return NULL;
index 84083dffc974f198e45ae71da4e95888f4941e7c..ac9cf5b8a61a160aa6011e8c07902267562246c2 100644 (file)
@@ -284,6 +284,7 @@ struct kernel_oplocks *linux_init_kernel_oplocks(void)
        act.sa_handler = NULL;
        act.sa_sigaction = signal_handler;
        act.sa_flags = SA_SIGINFO;
+       sigemptyset( &act.sa_mask );
        if (sigaction(RT_SIGNAL_LEASE, &act, NULL) != 0) {
                DEBUG(0,("Failed to setup RT_SIGNAL_LEASE handler\n"));
                return NULL;