Signal Handling--ref
/ After a while,check to see whether any signals are pending. / SIGINTsignal is pending when another sigpendingfunction is new in POSIX.1. Older systems have no equivalent facility.
/* If this flag is nonzero,don't handle the signal right away. */ volatile sig_atomic_t signal_pending; signal_pending. That way,we can handle several types of inconvenient signals with the same mechanism. defer_signalso that nested critical sections will work properly; thus,if defer_signalrequire more than one instruction; it is possible for a signal to happen in the middle. But that does not cause any problem. If the signal happens early enough to see the value from before the increment or decrement,that is equivalent to a signal which came before the beginning of the increment or decrement,which is a case that works properly. defer_signalbefore testing if (defer_signal == 1 && signal_pending != 0) raise (signal_pending); defer_signal--; ifstatement and the decrement would be effetively "lost" for an indefinite amount of time. The handler would merely set
defer_signalas a counter which must be tested along with
pausepause. Please read about its disadvantages,in the following section,before you use it.
|
- linux – MongoDB进程每天都在关闭.怎么在服务器上永远运行
- iPhone6好用吗 浅谈2.5D屏幕的现状与发展
- 拍大师怎么用 拍大师给视频添加陈欧体文字字幕特效教程
- 支付宝估值在哪里 支付宝估值功能演示
- linux – flock(1)无法释放锁定
- ios7怎么同步itunes
- macos – 无法在Zsh中完成MacPorts的选项卡
- killbackground怎么设置,killbackground使用教程
- linux – 如何在CentOS 5.10上为已安装的STUNNEL创建服务
- install keepalived on RedHat/CentOS to provide IP failo