Content deleted Content added
improve lead; add anchors |
Shorten Short description per WP:SDSHORT |
||
(24 intermediate revisions by 18 users not shown) | |||
Line 1:
{{Short description|Functions of the C standard software library}}
{{Use dmy dates|date=January 2022}}
{{C Standard Library}}
'''C process control''' refers to a group of functions in the [[C standard library|standard library]] of the [[C programming language]] implementing basic process control operations.<ref>{{cite book|last=Crawford|first=Tony|
==Overview of functions==
Line 9:
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▼
▲
; 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▼
▲
| causes normal program termination with cleaning up
|-
▲
| causes normal program termination without cleaning up ([[C99]])
|-
▲
| registers a function to be called on exit() invocation
|-
| {{anchor|quick_exit}}<code>[http://en.cppreference.com/w/c/program/quick_exit quick_exit]</code>
| causes normal program termination without cleaning up, but with IO buffers flushed ([[C11 (C standard revision)|C11]])
|-
| {{anchor|quick_exit}}<code>[http://en.cppreference.com/w/c/program/at_quick_exit at_quick_exit]</code>
| registers a function to be called on quick_exit() invocation
|-
▲
| accesses the list of the environment variables
|-
▲
| calls the host environment's command processor
|}
==References==
Line 23 ⟶ 45:
==External links==
{{wikibooks
{{clear}}
[[Category:C Standard Library]]▼
|