Skip to content

Conversation

@K10-K10
Copy link
Contributor

@K10-K10 K10-K10 commented Jan 18, 2026

  • csignalライブラリページの追加
  • signal,raise,sig_atomic_tの説明ページを追加

すみません
レビューお願いします

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2026

プレビュー (HTML) (更新時刻: 2026-01-18 23:44:32 JST)

  • Commit: 00cf017
  • プレビューの生成には時間がかかります (3~5分)。進捗状況はこちらをご確認ください。

変更記事一覧

5件の記事が変更されました。

※ソース (.md) に直接変更のあった記事を列挙しています。グローバル修飾や変換規則の変更による変化は考慮していません。

Comment on lines +38 to +48
int main ()
{
std::signal(SIGINT, signal_handler);
while(!flag){
//処理
}
if (flag){
std::cout << "catch SIGINT" << std::endl;
}
return 0;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int main ()
{
std::signal(SIGINT, signal_handler);
while(!flag){
//処理
}
if (flag){
std::cout << "catch SIGINT" << std::endl;
}
return 0;
}
int main ()
{
std::signal(SIGINT, signal_handler);
while (!flag) {
// 処理
}
if (flag) {
std::cout << "caught SIGINT" << std::endl;
}
return 0;
}

Comment on lines +60 to +64
while(!flag){
//処理
}
if(flag)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(!flag){
//処理
}
if(flag)
{
while (!flag) {
// 処理
}
if (flag) {

}
if(flag)
{
std::cout << "catch SIGINT" << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::cout << "catch SIGINT" << std::endl;
std::cout << "caught SIGINT" << std::endl;

using sig_atomic_t = integer-type;
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


```cpp
namespace std{
signal-handler* signal(int sig, signal-handler func);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
signal-handler* signal(int sig, signal-handler func);
extern "C" using signal-handler = void(int); // exposition only
signal-handler* signal(int sig, signal-handler* func);

namespace std{
signal-handler* signal(int sig, signal-handler func);
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```
* signal-handler[italic]

```
## 概要
プログラムにシグナルを送信する。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
プログラムにシグナルを送信する
現在のプログラムにシグナルを送信する

Comment on lines +31 to +33
また、以下の処理以外の動作をシグナルハンドラ内で行うとき、その動作は未定義。
- `volatile std::sig_atomic_t`への単純な読み書き
- `_Exit`関数と`abort`関数
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この部分沢山抜けている気がするのですが、C23 7.14.2.1/p5 を参照して書き直せますか。

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

Successfully merging this pull request may close these issues.

3 participants