As part of the signal handling package, LAM maintains two system
masks, a block mask and a retry mask.
Each contains a bit for every defined signal.
The block mask will prevent a signal from being handled if its
corresponding bit is set.
The retry mask indicates whether a system call to the daemon should be
retried after an given signal is handled.
Signals are defined in <lam_ksignal.h> and described in lam_ksignal(2).
lam_ksigblock()
sets the block mask to block each signal whose corresponding bit
in the mask argument is set, as well as those whose bits were set
in the original block mask.
lam_ksigsetmask()
explictly sets the system block mask to the mask argument.
All signals set in the mask argument become blocked - all others
become unblocked.
Both routines return the previous value of the block mask.
All signals begin as unblocked, and privileged signals cannot be blocked.
A blocked signal is not ignored - it is impeded.
If the block should be removed for a signal that was pending, the
signal handler will immediately be called.
Several impeded signals will fuse together as one and not be
handled distinctly.
Since some LAM daemon functions cause the calling process to block
there is an excellent chance that a system call will be interrupted
by a signal.
When this happens, the blocking function returns with the error EINTR.
If the bit corresponding to the delivered signal is set in the
retry mask, the daemon request will be automatically
retried after the signal handler returns.
lam_ksigretry()
resets the retry mask to
retry each signal whose corresponding bit in the mask argument
is set, as well as those whose bits were set in the original retry mask.
lam_ksigsetmask()
explictly sets the system retry mask to the mask argument.
All signals set in the mask argument will be retried - all others
will not be retried.
Both routines return the previous value of the retry mask.
Initially, all signals will be retried except SIGRELEASE,
which cannot be retried.
The macro
lam_ksigmask(signum) ,
defined in <lam_ksignal.h>, converts a signal number
into a mask with only the corresponding bit set.
lam_kpause()
causes the calling process to wait until any signal is delivered.