C process control: Difference between revisions

Content deleted Content added
moved
transform the function list into a table
Line 1:
 
{{C Standard Library}}
 
Line 8 ⟶ 7:
The process control functions are defined in the <code>stdlib.h</code> header (<code>cstdlib</code> header in C++).
 
{| class="wikitable" style="font-size:0.85em"
; Terminating a program
!
*{{anchor|abort}}<code>[http://en.cppreference.com/w/cpp/utility/program/abort abort]</code> - causes abnormal program termination (without cleaning up)
! Function
*{{anchor|exit}}<code>[http://en.cppreference.com/w/cpp/utility/program/exit exit]</code> - causes normal program termination with cleaning up
! Description
*{{anchor|_Exit}}<code>[http://en.cppreference.com/w/cpp/utility/program/_Exit _Exit]</code> - causes normal program termination without cleaning up
|-
*{{anchor|atexit}}<code>[http://en.cppreference.com/w/cpp/utility/program/atexit atexit]</code> - registers a function to be called on exit() invocation
;! rowspan=4 | Terminating a program
 
*| {{anchor|abort}}<code>[http://en.cppreference.com/w/cpp/utility/program/abort abort]</code> - causes abnormal program termination (without cleaning up)
; Communicating with the environment
| causes abnormal program termination (without cleaning up)
*{{anchor|getenv}}<code>[http://en.cppreference.com/w/cpp/utility/program/getenv getenv]</code> - accesses the list of the environment variables
|-
*{{anchor|system}}<code>[http://en.cppreference.com/w/cpp/utility/program/system system]</code> - calls the host environment's command processor
*| {{anchor|exit}}<code>[http://en.cppreference.com/w/cpp/utility/program/exit exit]</code> - causes normal program termination with cleaning up
| causes normal program termination with cleaning up
|-
*| {{anchor|_Exit}}<code>[http://en.cppreference.com/w/cpp/utility/program/_Exit _Exit]</code> - causes normal program termination without cleaning up
| causes normal program termination without cleaning up
|-
*| {{anchor|atexit}}<code>[http://en.cppreference.com/w/cpp/utility/program/atexit atexit]</code> - registers a function to be called on exit() invocation
| registers a function to be called on exit() invocation
|-
;! rowspan=2 | Communicating with the environment
*| {{anchor|getenv}}<code>[http://en.cppreference.com/w/cpp/utility/program/getenv getenv]</code> - accesses the list of the environment variables
| accesses the list of the environment variables
|-
*| {{anchor|system}}<code>[http://en.cppreference.com/w/cpp/utility/program/system system]</code> - calls the host environment's command processor
| calls the host environment's command processor
|}
 
==References==
Line 27 ⟶ 42:
 
{{prog-lang-stub}}
{{use dmy dates|January 2012}}
 
[[es:Stdlib.h]]
[[fa:Stdlib.h]]