1LAM_KSIGBLOCK(2)               LAM LOCAL LIBRARY              LAM_KSIGBLOCK(2)
2
3
4

NAME

6       lam_ksigblock,    lam_ksigsetmask,   lam_ksigretry,   lam_ksigsetretry,
7       lam_kpause - Manipulate LAM signal handling policy.
8

SYNOPSIS

10       #include <lam_ksignal.h>
11
12       int lam_ksigblock (int mask);
13       int lam_ksigsetmask (int mask);
14       int lam_ksigretry (int mask);
15       int lam_ksigsetretry (int mask);
16       int lam_kpause ();
17
18       int lam_ksigmask (int signum);
19

DESCRIPTION

21       As part of the signal handling package, LAM maintains two system masks,
22       a  block  mask and a retry mask.  Each contains a bit for every defined
23       signal.  The block mask will prevent a signal from being handled if its
24       corresponding  bit  is  set.  The retry mask indicates whether a system
25       call to the daemon should be retried after an given signal is  handled.
26       Signals are defined in <lam_ksignal.h> and described in lam_ksignal(2).
27
28       lam_ksigblock()  sets  the block mask to block each signal whose corre‐
29       sponding bit in the mask argument is set, as well as those  whose  bits
30       were  set in the original block mask.  lam_ksigsetmask() explictly sets
31       the system block mask to the mask argument.  All  signals  set  in  the
32       mask  argument become blocked - all others become unblocked.  Both rou‐
33       tines return the previous value of the block mask.
34
35       All signals begin  as  unblocked,  and  privileged  signals  cannot  be
36       blocked.   A  blocked  signal  is  not ignored - it is impeded.  If the
37       block should be removed for a signal that was pending, the signal  han‐
38       dler will immediately be called.  Several impeded signals will fuse to‐
39       gether as one and not be handled distinctly.
40
41       Since some LAM daemon functions cause  the  calling  process  to  block
42       there  is an excellent chance that a system call will be interrupted by
43       a signal.  When this happens, the blocking function  returns  with  the
44       error  EINTR.   If the bit corresponding to the delivered signal is set
45       in the retry mask, the daemon request will be automatically retried af‐
46       ter the signal handler returns.
47
48       lam_ksigretry() resets the retry mask to retry each signal whose corre‐
49       sponding bit in the mask argument is set, as well as those  whose  bits
50       were  set in the original retry mask.  lam_ksigsetmask() explictly sets
51       the system retry mask to the mask argument.  All  signals  set  in  the
52       mask  argument  will be retried - all others will not be retried.  Both
53       routines return the previous value of the retry mask.   Initially,  all
54       signals will be retried except SIGRELEASE, which cannot be retried.
55
56       The  macro lam_ksigmask(signum), defined in <lam_ksignal.h>, converts a
57       signal number into a mask with only the corresponding bit set.
58
59       lam_kpause() causes the calling process to wait until any signal is de‐
60       livered.
61

RETURN VALUE

63       lam_ksigblock(),  lam_ksigsetmask(),  lam_ksigretry()  and  lam_ksigse‐
64       tretry() all return the previous mask value.  lam_kpause()  always  re‐
65       turns -1 and the global variable errno is always set to EINTR.
66

SEE ALSO

68       lam_ksignal(2), MPIL_Signal(2)
69
70
71
72LAM 7.1.2                         March, 2006                 LAM_KSIGBLOCK(2)
Impressum