当前位置:网站首页>The difference between sigsuspend and sigwait
The difference between sigsuspend and sigwait
2022-07-25 01:09:00 【Blue sky lay】
sigsuspend(const sigset_t *mask)
Set the blocking signal to mask, Wait for other signals ( except mask Other signals ) Happen , If the signal occurs and the corresponding handler Has been carried out , Then return to -1, And set the corresponding errno( The value of the signal that has occurred ).
Be careful :sigsuspend Always returns -1
When the program is executed to suspend Signals that have occurred before will not be sigsuspend Capture
sigsuspend Call to change the signal mask state of the process , Blocking mask Signal in , When the call returns, change the mask to the state before the call
sigwait(const sigset_t *mask, int *sig):
wait for mask Signal in ( Any one can ) happen , If it happens , Set up *sig For signals that have occurred , return 0. If there is an error, return -1.
Be careful :sigwait Don't wait hander The signal of execution is equivalent to being sigwait to intercept ,handler It will not be called to execute .
sigwait Automatically cancel when calling mask Signal mask status in , Until a new signal arrives , Recover the signal mask word of the thread on return .
sigwait Call to
Wait for a signal to occur
边栏推荐
- [performance optimization] MySQL common slow query analysis tools
- Measurement and Multisim Simulation of volt ampere characteristics of circuit components (engineering documents attached)
- Young people who lost the IPO
- Redis transaction learning
- Wireshark introduction and packet capturing principle and process
- Verification of Kirchhoff's law and Multisim Simulation (engineering documents attached)
- 第三章 内核开发
- 启牛商学院靠谱吗?讲课老师推荐开华泰账户安全吗
- Research and Multisim Simulation of linear circuit characteristics (engineering documents attached)
- Game partner topic: the cooperation between breederdao and monkeyleague kicked off
猜你喜欢

Vegetable greenhouses turned into smart factories! Baidu AI Cloud helps Shouguang, Shandong build a new benchmark for smart agriculture

7.24 party notice

Listing of China graphite: the market value is nearly HK $1.2 billion, achieving a zero breakthrough in the listing of Hegang private enterprises
![[25. Hash table]](/img/c4/1500d070d44d3bd84eb141ed38013d.png)
[25. Hash table]

VC hesitates to invest in Henan

Latex notes

Kusionstack open source | exploration and practice of kusion model library and tool chain

Multi merchant mall system function disassembly Lecture 14 - platform side member level
![Detailed explanation of zero length array in C language (1) [information at the end of the article]](/img/89/1f01e24ce52b2d459f26397cd8527f.png)
Detailed explanation of zero length array in C language (1) [information at the end of the article]

The IPO of Tuba rabbit was terminated: the annual profit fell by 33%, and Jingwei Sequoia was the shareholder
随机推荐
Advanced multithreading (Part 2)
paddlepaddle论文系列之Alexnet详解(附源码)
Educational events
unresolved external symbol [email protected] resolvent
7.20 - daily question - 408
7.14 - daily question - 408
The current situation of the industry is disappointing. After working, I returned to UC Berkeley to study for a doctoral degree
进程的几种状态
Call camera photo album / upload / scan code in uniapp
Unity slider slider development
VC hesitates to invest in Henan
Director of Shanghai Bureau of culture and Tourism: safety is the lifeline of culture and tourism, and we are seizing the new track of yuancosmos
Verification of Kirchhoff's law and Multisim Simulation (engineering documents attached)
Chip sold at sand price: Lei Jun's dream was "ruined" by this company
How to empty localstorage before closing a page
Pursue and kill "wallet Assassin" all over the network
UXDB在不知道明文密码的情况下重置密码
7.18 - daily question - 408
Sort out some scattered knowledge points by yourself
Nacos hand to hand teaching [i] dynamic configuration of Nacos