diff options
author | pjd <pjd@FreeBSD.org> | 2010-08-31 06:22:03 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-08-31 06:22:03 +0000 |
commit | 7476d01cc94f357f807b60f841f009434854ffbb (patch) | |
tree | 0c451c0e5ca3c95d13d44f6837cb42cbd6a01896 /sbin | |
parent | b283597663d3728fd277182c789bfdc57ad7dc9d (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sbin/hastd/primary.c | 5 |
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); } |