名前空間
変種
操作

std::signal

提供: cppreference.com
< cpp‎ | utility‎ | program

 
 
ユーティリティライブラリ
支援を入力します (basic types, RTTI, type traits)
動的なメモリ管理
エラー処理
プログラムユーティリティ
可変個引数関数
日付と時刻
関数オブジェクト
initializer_list(C++11)
bitset
hash(C++11)
関係演算子
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
ペアとタプル
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
フォワード、スワップ、および移動
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
プログラム支援ユーティリティ
プログラムの終了
Original:
Program termination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
abort
exit
quick_exit(C++11)
_Exit(C++11)
環境と通信する
Original:
Communicating with the environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
信号
Original:
Signals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
信号タイプ
Original:
Signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
SIGABRT
SIGFPE
SIGILL
SIGINT
SIGSEGV
SIGTERM
非ローカルジャンプします
Original:
Non-local jumps
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
setjmp
longjmp
タイプ
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
jmp_buf
 
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.
シグナルハンドラが機能するように設定し、信号が発生すると、それは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.
信号のいくつかのために、実装は、プログラムの起動時に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.
計算上の例外を指定しSIGFPESIGILLSIGSEGVまたは任意の他の実装定義信号を処理する際に、ユーザーが関数を返す定義した場合、動作は未定義です。ほとんどの実装ではプログラムは終了します.
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.
シグナルハンドラが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.
  • シグナルハンドラは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::abortstd::_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:
defines signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(マクロ定数) [edit]
Original:
the signal to set the signal handler to. It can be an implementation-defined value or one of the following values:
信号の種類を定義します
Original:
defines signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(マクロ定数) [edit]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
handler -
シグナルハンドラ。これは、次のいずれかである必要があります。
  • SIG_DFLマクロ。シグナルハンドラがデフォルトのシグナルハンドラに設定されています。
  • SIG_IGNマクロ。信号は無視されます。

関数へのポインタ*。関数のシグネチャは、次と同等でなければなりません:

void fun(int sig);
Original:
the signal handler. This must be one of the following:
  • SIG_DFL macro. The signal handler is set to default signal handler.
  • SIG_IGN macro. The signal is ignored.
  • pointer to a function. The signature of the function must be equivalent to the following:
void fun(int sig);
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.

[編集]

[編集] も参照してください

特定のシグナルのシグナルハンドラを実行します
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.

(関数) [edit]
C documentation for signal