std::signal
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <csignal>
|
||
void (*signal( int sig, void (*handler) (int))) (int); |
||
Legt den Error-Handler für Signal
sig
. Das Signal-Handler einstellen können, so dass standardmäßig Handhabung auftreten wird, wird das Signal ignoriert, oder eine benutzerdefinierte Funktion aufgerufen wird .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.
Wenn das Signal-Handler auf eine Funktion eingestellt ist und ein Signal auftritt, ist es die Umsetzung definiert, ob std::signal(sig, SIG_DFL) umgehend vor Beginn der Signal-Handler ausgeführt werden. Auch die Umsetzung etwas Implementierung definiert Satz von Signalen von auftritt, während das Signal-Handler läuft verhindern .
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.
Für einige der Signale kann die Umsetzung std::signal(sig, SIG_IGN) beim Start des Programms aufrufen. Für den Rest muss die Umsetzung nennen 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.
Wenn der Benutzer Funktion zurückkehrt definierten beim Umgang
SIGFPE
, SIGILL
, SIGSEGV
oder jede andere Implementierung definiert Signal Angabe einer rechnerischen Ausnahme, ist das Verhalten undefiniert. In den meisten Implementierungen das Programm beendet . 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.
Wenn die Signal-Verwaltungseinheit infolge std::abort oder std::raise genannt wird, ist das Verhalten nicht definiert, wenn eine der folgenden Bedingungen nicht eingehalten wird:
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.
- das Signal Handler ruft 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. - der Signal-Handler verweist auf ein Objekt der statischen Lagerdauer, die nicht als volatile std::sig_atomic_t erklärt wird .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. - das Signal Handler ruft jede Funktion innerhalb der Standard-Bibliothek, außer std::abort, std::_Exit oder std::signal mit dem ersten Argument nicht die Nummer des Signals derzeit gehandhabt .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.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
sig | - | das Signal, um das Signal-Handler zu setzen. Es kann eine Implementierung definierter Wert oder einer der folgenden Werte sein:
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 | - | der Signal-Handler. Dies muss einer der folgenden sein:
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. |
[Bearbeiten] Rückgabewert
Vorherige Signal-Handler über Erfolg oder
SIG_ERR
bei Ausfall (Einstellung ein Signal-Handler kann bei einigen Implementierungen deaktiviert werden) .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.
[Bearbeiten] Beispiel
This section is incomplete Reason: no example |
[Bearbeiten] Siehe auch
läuft der Signal-Handler für bestimmte Signal 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. (Funktion) | |
C documentation for signal
|