1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

Fix from Steve G <linux_4ever@yahoo.com>. Ensure sigemptyset is called on

the sa_mask to prevent valgrind complaints.
Jeremy.
This commit is contained in:
Jeremy Allison -
parent 9202362ee1
commit ef2d5a9c0c
2 changed files with 7 additions and 5 deletions

View 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;

View 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;