C process control

C process control refers to a group of functions in the standard library of the C programming language implementing basic process control operations.[1][2] The process control operations include actions such as termination of the program with various levels of cleanup, running an external command interpreter or accessing the list of the environment operations.

Overview of functions

The process control functions are defined in the stdlib.h header (cstdlib header in C++).

FunctionDescription
Terminating
a program
abortcauses abnormal program termination (without cleaning up)
exitcauses normal program termination with cleaning up
_Exitcauses normal program termination without cleaning up (C99)
atexitregisters a function to be called on exit() invocation
quick_exitcauses normal program termination without cleaning up, but with IO buffers flushed (C11)
at_quick_exitregisters a function to be called on quick_exit() invocation
Communicating with
the environment
getenvaccesses the list of the environment variables
systemcalls the host environment's command processor

References

External links