Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

問題 23:^S/^Q と SIGSTOP/SIGCONT は無関係 #6

Closed
kariya-mitsuru opened this issue Oct 4, 2021 · 2 comments
Closed

問題 23:^S/^Q と SIGSTOP/SIGCONT は無関係 #6

kariya-mitsuru opened this issue Oct 4, 2021 · 2 comments

Comments

@kariya-mitsuru
Copy link
Contributor

問題 23 の中で、^S/^Q がシグナルに関係しているとの記載がありますが、シグナルとは無関係です。

^S/^Q は端末ドライバによる出力フローコントロールであり、^S で出力が止まってもプロセスは動作し続けていますが、SIGSTOP/SIGCONT はプロセスの停止/再開のシグナルであり、SIGSTOP を受信したプロセスは停止します。

実際に ps コマンドで stat を見ると、^S の場合は大抵 S(あるいは R)ですが、SIGSTOP の場合は必ず T です。

キー入力でシグナルに関連するのは ^Z(TSTP)、^\(QUIT)、^C(INT)です。

@ryuichiueda
Copy link
Contributor

ryuichiueda commented Oct 4, 2021

これは見直した著者陣全員が分かってたつもりが実はそうでなかった(あるいはスルーしてしまった)という誤りでした。訂正の文言を考えます。大変ありがとうございます。

@ryuichiueda
Copy link
Contributor

このように修正を掲示しておきます。

p.105問題文4行目

修正前: このシェルの挙動もシグナルに関係しています。
修正後: これと同じような挙動はシグナルでも実現できます。

p.106本文の3行目

修正前: Ctrl + Q で発行されるシグナル
修正後: Ctrl + Q と同じ働きをするシグナル

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants