名前空間
変種
操作

signal

提供: cppreference.com
< c‎ | program

 
 
プログラム支援ユーティリティ
プログラムの終了
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 <signal.h>
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.
シグナルハンドラが機能するように設定し、信号が発生すると、それはsignal(sig, SIG_DFL)がシグナルハンドラの開始の直前に実行されるかどうかを定義した実装です。また、実装はシグナルハンドラの実行中に発生するいくつかの実装で定義された一連のAF信号を防ぐことができます.
Original:
When signal handler is set to a function and a signal occurs, it is implementation defined whether signal(sig, SIG_DFL) will be executed immediately before the start of signal handler. Also, the implementation can prevent some implementation-defined set af 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.
SIGFPEを取り扱う際に、ユーザーが関数を返す定義した場合、またはSIGILLSIGSEGV、動作は未定義です。ほとんどの実装ではプログラムは終了します.
Original:
If the user defined function returns when handling SIGFPE, SIGILL or SIGSEGV, 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.
シグナルハンドラがabortまたはraiseの結果として呼び出された場合、次の要件のいずれかに従わない場合、動作は未定義です
Original:
If the signal handler is called as a result of abort or 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.
  • シグナルハンドラはraise呼び出し.
    Original:
    the signal handler calls raise.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • シグナルハンドラはvolatile sig_atomic_tとして宣言されていない静的記憶域期間のオブジェクトを参照する.
    Original:
    the signal handler refers to an object of static storage duration which is not declared as volatile 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.
  • シグナルハンドラはabort_Exit、またはsignal最初の引数は、現在処理信号の数ではないことを除いて、標準ライブラリ内の任意の関数を呼び出します.
    Original:
    the signal handler calls any function within the standard library, except abort, _Exit, or 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]