Skip to content

Commit

Permalink
[fix][text error]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tickdack authored Dec 20, 2021
1 parent 87aebe1 commit a94b1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion part2/ch08-exceptional-control-flow/8.5-signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ int sigsuspend(const sigset_t *mask);
// 返回:-1
```

sigsuspend 函数暂时用 mask 替换当前的阻塞集合,然后挂起该进程,直到收到。个信号,其行为要么是运行一个处理程序,要么是终止该进程。如果它的行为是终止,那么该进程不从 sigsuspend 返回就直接终止。如果它的行为是运行一个处理程序,那么 sigsuspend 从处理程序返回,恢复调用 sigsuspend 时原有的阻塞集合。
sigsuspend 函数暂时用 mask 替换当前的阻塞集合,然后挂起该进程,直到收到一个信号,其行为要么是运行一个处理程序,要么是终止该进程。如果它的行为是终止,那么该进程不从 sigsuspend 返回就直接终止。如果它的行为是运行一个处理程序,那么 sigsuspend 从处理程序返回,恢复调用 sigsuspend 时原有的阻塞集合。

sigsuspend 函数等价于下述代码的原子的(不可中断的)版本:

Expand Down

0 comments on commit a94b1fa

Please sign in to comment.