Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/program"

From cppreference.com
< cpp‎ | utility
(Signals: formatting)
(Program termination: formatted)
Line 6: Line 6:
  
 
{{dcl list begin}}
 
{{dcl list begin}}
{{dcl list h1 | Functions}}
 
 
{{dcl list header | cstdlib}}
 
{{dcl list header | cstdlib}}
 
{{dcl list template | cpp/utility/program/dcl list abort}}
 
{{dcl list template | cpp/utility/program/dcl list abort}}
Line 15: Line 14:
 
{{dcl list template | cpp/utility/program/dcl list at_quick_exit}}
 
{{dcl list template | cpp/utility/program/dcl list at_quick_exit}}
  
{{dcl list h1 | Macro constants}}
+
{{dcl list h2 | Execution outcome indicators}}
 
{{dcl list template | cpp/utility/program/dcl list EXIT_SUCCESS}}
 
{{dcl list template | cpp/utility/program/dcl list EXIT_SUCCESS}}
 
{{dcl list template | cpp/utility/program/dcl list EXIT_FAILURE}}
 
{{dcl list template | cpp/utility/program/dcl list EXIT_FAILURE}}
 
{{dcl list end}}
 
{{dcl list end}}
 +
p
  
 
==Communicating with the environment==
 
==Communicating with the environment==

Revision as of 06:10, 16 July 2011

Template:cpp/utility/program/sidebar

Contents

Program termination

The following functions manage program termination and resource cleanup.

Template:cpp/utility/program/dcl list EXIT SUCCESSTemplate:cpp/utility/program/dcl list EXIT FAILURE
Defined in header <cstdlib>
causes abnormal program termination (without cleaning up)
(function) [edit]
causes normal program termination with cleaning up
(function) [edit]
causes quick program termination without completely cleaning up
(function) [edit]
(C++11)
causes normal program termination without cleaning up
(function) [edit]
registers a function to be called on std::exit() invocation
(function) [edit]
registers a function to be called on std::quick_exit invocation
(function) [edit]
Execution outcome indicators

p

Communicating with the environment

calls the host environment's command processor
(function) [edit]
access to the list of environment variables
(function) [edit]

Signals

Several functions and macro constants for signal management are provided.

Template:cpp/utility/program/dcl list SIG DFLTemplate:cpp/utility/program/dcl list SIG IGNTemplate:cpp/utility/program/dcl list SIGABRTTemplate:cpp/utility/program/dcl list SIGFPETemplate:cpp/utility/program/dcl list SIGILLTemplate:cpp/utility/program/dcl list SIGINTTemplate:cpp/utility/program/dcl list SIGSEGVTemplate:cpp/utility/program/dcl list SIGTERM
Defined in header <csignal>
sets a signal handler for particular signal
(function) [edit]
runs the signal handler for particular signal
(function) [edit]
Signal handling strategies
return value of signal specifying that an error was encountered
(macro constant) [edit]
Signal types

Non-local jumps

Types

execution context type
(typedef) [edit]

Functions

saves the context
(function macro) [edit]
jumps to specified location
(function) [edit]