Improve assertion that an ignored or blocked signal is not delivered.

Split two conditions into separate asserts.  Print additional details,
like the signal number and action value.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
kib 2017-10-16 20:15:19 +00:00
parent 27e9b9ded2
commit 30cdab3f84

View File

@ -3030,8 +3030,10 @@ postsig(int sig)
/*
* If we get here, the signal must be caught.
*/
KASSERT(action != SIG_IGN && !SIGISMEMBER(td->td_sigmask, sig),
("postsig action"));
KASSERT(action != SIG_IGN, ("postsig action %p", action));
KASSERT(!SIGISMEMBER(td->td_sigmask, sig),
("postsig action: blocked sig %d", sig));
/*
* Set the new mask value and also defer further
* occurrences of this signal.