Changes the signal mask for the calling kernel thread.
#include <sys/encap.h>
void limit_sigs ( siglist, old_mask) sigset_t *siglist; sigset_t *old_mask;
void sigsetmask (old_mask) sigset_t *old_mask;
siglist | Specifies the signal set to deliver. |
old_mask | Points to the old signal set. |
The limit_sigs kernel service changes the signal mask for the calling kernel thread such that only the signals specified by the siglist parameter will be delivered, unless they are currently being blocked or ignored.
The old signal mask is returned via the old_mask parameter. If the siglist parameter is NULL, the signal mask is not changed; it can be used for getting the current signal mask.
The sigsetmask kernel service should be used to restore the set of blocked signals for the calling thread. The typical usage of these services is the following:
sigset_t allowed = limited set of signals sigset_t old; /* limits the set of delivered signals */ limit_sigs (&allowed, &old); /* do something with a limited set of delivered signals */ /* restore the original set */ sigsetmask (&old);
The limit_sigs and sigsetmask kernel services can be called from the process environment only.
The limit_sigs and sigsetmask kernel services have no return values.
The limit_sigs and sigsetmask kernel services are part of the Base Operating System (BOS) Runtime.
The kthread_kill kernel service.
Process and Exception Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.