std::exit

来自cppreference.com

 
 
實用工具庫
類型的支持 (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 <cstdlib>
[[noreturn]] void exit( int exit_code );
(C++11 起)
             void exit( int exit_code );
(至 C++11)
導致正常的程序終止發生.
Original:
Causes normal program termination to occur.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
若干清理步驟被執行:
Original:
Several cleanup steps are performed:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 線程本地存儲時間對象的析構函數被調用
    Original:
    destructors of objects with thread local 存儲時間 are called
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 具有靜態存儲持續時間的對象的析構函數被調用
    Original:
    destructors of objects with static storage duration are called
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 功能傳遞給std::atexit被調用。如果有異常傳播的任何功能,被稱為std::terminate
    Original:
    functions passed to std::atexit are called. If an exception tries to propagate out of any of the function, std::terminate is called
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 刷新並關閉所有的C流
    Original:
    all C streams are flushed and closed
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • std::tmpfile所創建的文件將被刪除
    Original:
    files created by std::tmpfile are removed
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 控制被返回到主機環境。如果exit_codeEXIT_SUCCESS,實現自定義的狀態,表示成功終止。如果exit_codeEXIT_FAILURE,實現自定義的狀態,表示成功終止。在其他情況下實現自定義的狀態值,則返回.
    Original:
    control is returned to the host environment. If exit_code is EXIT_SUCCESS, an implementation-defined status, indicating successful termination is returned. If exit_code is EXIT_FAILURE, an implementation-defined status, indicating unsuccessful termination is returned. In other cases implementation-defined status value is returned.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
不調用析構函數的變數自動存儲的持續時間.
Original:
Destructors of variables with automatic 存儲的持續時間 are not called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目錄

[编辑] 參數

exit_code -
退出的程序的狀態
Original:
exit status of the program
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 返回值

(無)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 為例

[编辑] 另請參閱

導致程序異常終止(不清洗)
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.

(函數) [edit]
註冊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.

(函數) [edit]
(C++11)
沒有完全清理,會導致正常的程序終止
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.

(函數) [edit]