From 3ededa5f7bd8c039346841d7902b5344604a9d9a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 15 May 2003 17:37:52 +0000 Subject: Fix from Steve G . Ensure sigemptyset is called on the sa_mask to prevent valgrind complaints. Jeremy. (This used to be commit e065c3a58f5c7f2612596574046a73869183dbd3) --- source3/smbd/notify_kernel.c | 11 ++++++----- source3/smbd/oplock_linux.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c index efe93de5af..8fcc18a09f 100644 --- a/source3/smbd/notify_kernel.c +++ b/source3/smbd/notify_kernel.c @@ -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; diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c index 84083dffc9..ac9cf5b8a6 100644 --- a/source3/smbd/oplock_linux.c +++ b/source3/smbd/oplock_linux.c @@ -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; -- cgit