进入信号处理函数,是不是会自动把进入信号加入信号屏蔽字?还有sigpending
是不是 要用sigsetjmp(),siglongjmp()进入信号处理函数才会自动把进入信号加入信号屏蔽字?
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
struct sigaction {
void (*sa_handler)(int);
void (*sa_sigaction)(int, siginfo_t *, void *);
sigset_t sa_mask;
int sa_flags;
void (*sa_restorer)(void);
}
sa_mask gives a mask of signals which should be blocked during execution of the signal handler. In addition, the signal which triggered the handler will be
blocked, unless the SA_NODEFER or SA_NOMASK flags are used.
C/C++ code The sigpending call allows the examination of pending signals (ones which have been raised while blocked). The signal mask of pending signals is stored in
set.
The sigpending call allows the examination of pending signals (ones which have been raised while blocked). The signal mask of pending signals is stored in set.