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
This commit is contained in:
Pawel Jakub Dawidek 2010-08-31 06:22:03 +00:00
parent 55d308bc94
commit 852ac373cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212046

View File

@ -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);
}