Espaces de noms
Variantes
Actions

std::signal

De cppreference.com
< cpp‎ | utility‎ | program

 
 
 
Services d'appui aux programmes
La fin du programme
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)
Communiquer avec l'environnement
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.
Signaux
Original:
Signals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types de signaux
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
Non-locales sauts
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
Types
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
 
Déclaré dans l'en-tête <csignal>
void(*signal(int sig, void(*handler)(int)))(int);
Définit le gestionnaire d'erreurs pour sig signal. Le gestionnaire de signal peut être réglé de sorte que la gestion par défaut se produira, le signal est ignoré, ou une fonction définie par l'utilisateur est appelé .
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.
Quand gestionnaire de signal est définie sur une fonction et un signal se produit, il est défini par l'implémentation si std::signal(sig, SIG_DFL) sera exécutée immédiatement avant le début de gestionnaire de signal. En outre, la mise en œuvre peut prévenir certains définie par l'implémentation ensemble de signaux de se produire alors que le gestionnaire de signal fonctionne .
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.
Pour certains de ces signaux, la mise en œuvre peut appeler std::signal(sig, SIG_IGN) au démarrage du programme. Pour le reste, la mise en œuvre doit std::signal(sig, SIG_DFL) appeler .
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.
Si l'utilisateur défini fonction retourne lors de la manipulation SIGFPE, SIGILL, SIGSEGV ou toute autre définition de l'implémentation signal indiquant une exception calcul, le comportement est indéfini. Dans la plupart des implémentations, le programme se termine .
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.
Si le gestionnaire de signal est appelé à la suite de std::abort ou std::raise, le comportement est indéfini si l'une des conditions suivantes n'est pas respectée:
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.
  • le handler de signal appelle 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.
  • le gestionnaire de signal se réfère à un objet de la durée de stockage statique qui n'est pas déclarée comme volatilestd::sig_atomic_t .
    Original:
    the signal handler refers to an object of static storage duration which is not declared as volatilestd::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.
  • le gestionnaire de signaux appelle une fonction dans la bibliothèque standard, sauf std::abort, std::_Exit, ou std::signal avec le premier argument n'est pas le numéro du signal actuellement traitée .
    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.

Sommaire

[modifier]Paramètres

sig -
le signal de définir le gestionnaire de signal. Elle peut être mise en oeuvre définie par une valeur ou une des valeurs suivantes:
définit les types de signaux
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.

(constante macro)[edit]
Original:
the signal to set the signal handler to. It can be an implementation-defined value or one of the following values:
définit les types de signaux
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.

(constante macro)[edit]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
handler -
le gestionnaire de signal. Ce doit être l'un des suivants:
  • SIG_DFL macro. Le gestionnaire de signal est réglé par défaut gestionnaire de signal.
  • SIG_IGN macro. Le signal est ignoré.
  • Pointeur vers une fonction. La signature de la fonction doit être équivalente à la suivante:
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.

[modifier]Retourne la valeur

Gestionnaire de signal précédent sur le succès ou l'échec sur SIG_ERR (création d'un gestionnaire de signal peut être désactivée sur certaines implémentations) .
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.

[modifier]Exemple

[modifier]Voir aussi

exécute le gestionnaire de signal pour un signal particulier
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.

(fonction)[edit]
C documentation for signal
close