[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/utility/program/exit [Back]  [Original]

std::exit cppreference.com
cppreference.com
Espaces de noms
Variantes

std::exit

De cppreference.com
 
 
 
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
 
<tbody> </tbody>
Dclar dans l'en-tte <cstdlib>
[[noreturn]] void exit( int exit_code );
(depuis C++11)
             void exit( int exit_code );
(avant C++11)

Provoque un arrt normal du programme.

Plusieurs tapes de nettoyage ont lieu:

  • appelle le destructeur des objets ayant une dure de stockage locale au thread
  • appelle le destructeur des objets ayant une dure de stockage statique
  • les fonctions fournies std::atexit sont appeles. Si une exception tente de se propager depuis la fonction, std::terminate est appele
  • tous les flux de type C sont vids et ferms
  • les fichiers crs par std::tmpfile sont supprims
  • le contrle est renvoy l'environnement hte. Si exit_code est EXIT_SUCCESS, une valeur de retour dfini par l'implmentation et indiquant une fin russie est retourne. Si exit_code est EXIT_FAILURE, une valeur de retour dfini par l'implmentation, et indiquant une fin en chec est retourne. Autrement, une valeur de retour dfini par l'implmentation est retourne.

Les destructeurs de variables avec la dure de stockage automatique ne sont pas appels .

Paramtres

exit_code - valeur de retour du programme

Retourne la valeur

(Aucun)

Exemple

Voir aussi

provoque la terminaison anormale du programme (sans nettoyage)
Original:
causes abnormal program termination (without cleaning up)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]
enregistre une fonction qui sera appele lors de son invocation exit()
Original:
registers a function to be called on exit() invocation
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++11)
provoque l'arrt du programme normal sans compltement nettoyer
Original:
causes normal program termination without completely cleaning up
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]

Web Proxy Viewer  |  New URL  |  Original Page