sigsuspend用于在接收到某个信号之前,临时用mask替换进程的信号掩码,并暂停进程执行,直到收到信号为止。
Skipping sigsuspend(&zeromask); can cause a problem.
忽略 sigsuspend(&zeromask); 可能会引发问题。
The function call sigsuspend resolves this problem by resetting the signal mask and putting the process to sleep in a single atomic operation.
函数调用sigsuspend通过重置信号掩码并使进程休眠一个单一的原子操作来解决这一问题。
If you are sure that signal generation in this window of time won't have any adverse effects, you can skip sigsuspend and go directly to resetting the signal.
如果您能确保在此时间窗口中生成的信号不会有任何负面影响,那么您可以忽略sigsuspend并直接重新设置信号。
sigsuspend用于在接收到某个信号之前,临时用mask替换进程的信号掩码,并暂停进程执行,直到收到信号为止。
应用推荐