diff options
author | Petr Písař <ppisar@redhat.com> | 2021-03-16 17:28:15 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-03-16 17:57:19 +0100 |
commit | 25f16b1de313ce0d411f754572f94f051bfbe3c8 (patch) | |
tree | 820597c4bd4a8db8e70ac3760bab07903589a2d7 | |
parent | 1959f3768a284315250acd4d17a9f5ef0b8ea189 (diff) | |
download | linuxquota-25f16b1de313ce0d411f754572f94f051bfbe3c8.tar.gz |
quota_nld: Initialize sa_mask when registering PID file removal
term_action.sa_mask is an automatic variable and and thus unitialized.
This patch empties the signal mask.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quota_nld.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quota_nld.c b/quota_nld.c index 72d99a9..09c4775 100644 --- a/quota_nld.c +++ b/quota_nld.c @@ -466,7 +466,7 @@ static void use_pid_file(void) term_action.sa_handler = remove_pid; term_action.sa_flags = 0; - if (sigaction(SIGTERM, &term_action, NULL)) + if (sigemptyset(&term_action.sa_mask) || sigaction(SIGTERM, &term_action, NULL)) errstr(_("Could not register PID file removal on SIGTERM.\n")); if (store_pid()) errstr(_("Could not store my PID %jd.\n"), (intmax_t )getpid()); |