std::signal
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
Defined in header <csignal>
|
||
void (*signal( int sig, void (*handler) (int))) (int); |
||
信号
sig
のエラーハンドラを設定します。シグナルハンドラがデフォルトの処理が行われるように設定することができ、信号は無視され、またはユーザー定義関数が呼び出されます.Original:
Sets the error handler for signal
sig
. The signal handler can be set so that default handling will occur, signal is ignored, or an user-defined function is called.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
シグナルハンドラが機能するように設定し、信号が発生すると、それはstd::signal(sig, SIG_DFL)がシグナルハンドラの開始の直前に実行されるかどうかを定義した実装です。また、実装はシグナルハンドラの実行中に発生する信号のいくつかの実装で定義された一連のを防ぐことができます.
Original:
When signal handler is set to a function and a signal occurs, it is implementation defined whether std::signal(sig, SIG_DFL) will be executed immediately before the start of signal handler. Also, the implementation can prevent some implementation-defined set of signals from occurring while the signal handler runs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
信号のいくつかのために、実装は、プログラムの起動時にstd::signal(sig, SIG_IGN)を呼び出すことができます。残りの部分については、実装がstd::signal(sig, SIG_DFL)を呼び出す必要があります.
Original:
For some of the signals, the implementation may call std::signal(sig, SIG_IGN) at the startup of the program. For the rest, the implementation must call std::signal(sig, SIG_DFL).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
計算上の例外を指定し
SIGFPE
、SIGILL
、SIGSEGV
または任意の他の実装定義信号を処理する際に、ユーザーが関数を返す定義した場合、動作は未定義です。ほとんどの実装ではプログラムは終了します. Original:
If the user defined function returns when handling
SIGFPE
, SIGILL
, SIGSEGV
or any other implementation-defined signal specifying a computational exception, the behavior is undefined. In most implementations the program terminates. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
シグナルハンドラがstd::abortまたはstd::raiseの結果として呼び出された場合、次の要件のいずれかに従わない場合、動作は未定義です
Original:
If the signal handler is called as a result of std::abort or std::raise, the behavior is undefined if any of the following requirements is not followed:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- シグナルハンドラはstd::raise呼び出し.Original:the signal handler calls std::raise.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - シグナルハンドラはvolatile std::sig_atomic_tとして宣言されていない静的記憶域期間のオブジェクトを参照する.Original:the signal handler refers to an object of static storage duration which is not declared as volatile std::sig_atomic_t.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - シグナルハンドラはstd::abort、std::_Exit、またはstd::signal最初の引数は、現在処理信号の数ではないことを除いて、標準ライブラリ内の任意の関数を呼び出します.Original:the signal handler calls any function within the standard library, except std::abort, std::_Exit, or std::signal with the first argument not being the number of the signal currently handled.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] パラメータ
sig | - | シグナルハンドラを設定するための信号。これは、実装定義の値または次の値のいずれかを指定できます。
Original: the signal to set the signal handler to. It can be an implementation-defined value or one of the following values:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | ||||||||||||||||||
handler | - | シグナルハンドラ。これは、次のいずれかである必要があります。
関数へのポインタ*。関数のシグネチャは、次と同等でなければなりません:
Original: the signal handler. This must be one of the following:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] 値を返します
失敗した場合に、成功または
SIG_ERR
前へシグナルハンドラ(シグナルハンドラを設定することは、いくつかの実装で無効にすることができます).Original:
Previous signal handler on success or
SIG_ERR
on failure (setting a signal handler can be disabled on some implementations).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例
This section is incomplete Reason: no example |
[編集] 参照
特定のシグナルのシグナルハンドラを実行します Original: runs the signal handler for particular signal The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | |
C documentation for signal
|