10.12 信号_sigprocmask函数
来源:互联网 发布:淘宝外设天下假货 编辑:程序博客网 时间:2024/05/26 07:30
- #include <signal.h>
- int sigprocmask(int how, const sigset_t *restrict set,sigset_t *restrict oset);
返回值:成功返回0,出错返回-1
首先,若oset是非空指针,那么进程的当前信号屏蔽字通过oset返回。其次,若set是一个非空指针,则参数how指示如何修改当前信号屏蔽字。最后,如果set是空指针,则不改变该进程的信号屏蔽字,how的值也无意义。
Figure 10.12 Ways to change current signal mask using sigprocmask
how
Description
SIG_BLOCK
The new signal mask for the process is the union of its current signal mask and the signal set pointed to by set. That is, set contains the additional signals that we want to block.
SIG_UNBLOCK
Thenew signal mask for the process is the intersection of its currentsignal mask and the complement of the signal set pointed to by set. That is, set contains the signals that we want to unblock.
SIG_SETMASK
The new signal mask for the process is replaced by the value of the signal set pointed to by set.
在调用sigprocmask后如果有任何未决的、不再阻塞的信号,则在sigprocmask返回前,至少会将其中一个信号递送给该进程。
- 10.12 信号_sigprocmask函数
- 信号函数
- 信号函数
- 信号处理函数
- 常用的信号函数
- 10.3 信号_signal函数
- 10.13 信号_sigpending函数
- 10.14 信号_sigaction函数
- 10.16 信号_sigsuspend函数
- 10.17 信号_abort函数
- 10.18 信号_system函数
- 10.19 信号_sleep函数
- 信号处理相关函数
- 信号处理函数 signal
- 信号处理函数
- 信号集操作函数
- 信号处理相关函数
- 信号和槽函数
- 编写测试执行最好方法
- Access中取行号
- DB2 START MSTR ABEND=SB78
- 未来五年程序员需要掌握的10项技能
- Windows注册表应用的30个实例
- 10.12 信号_sigprocmask函数
- IE默认连接首页被修改
- 如何快速创建注册表文件
- Windows下BOOST库的编译(个人备注)
- Ubuntu Server 10.04 安装图形界面GDM
- core文件的简单介绍
- 国际间支付通道冲突 促国内银行卡芯片化加速
- REG文件全面解析
- SQL中WHERE 1=1的作用