summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-31 06:22:03 +0000
committerpjd <pjd@FreeBSD.org>2010-08-31 06:22:03 +0000
commit7476d01cc94f357f807b60f841f009434854ffbb (patch)
tree0c451c0e5ca3c95d13d44f6837cb42cbd6a01896 /sbin/hastd
parentb283597663d3728fd277182c789bfdc57ad7dc9d (diff)
downloadFreeBSD-src-7476d01cc94f357f807b60f841f009434854ffbb.zip
FreeBSD-src-7476d01cc94f357f807b60f841f009434854ffbb.tar.gz
Mask only those signals that we want to handle.
Suggested by: jilles MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/primary.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index a8a2d41..6f0995b 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -424,7 +424,10 @@ init_environment(struct hast_resource *res __unused)
/*
* Turn on signals handling.
*/
- PJDLOG_VERIFY(sigfillset(&mask) == 0);
+ PJDLOG_VERIFY(sigemptyset(&mask) == 0);
+ PJDLOG_VERIFY(sigaddset(&mask, SIGHUP) == 0);
+ PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0);
+ PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0);
PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
}
OpenPOWER on IntegriCloud