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 functionsedit
The process control functions are defined in the stdlib.h header (cstdlib header in C++).
Function
Description
Terminating a program
abort
causes abnormal program termination (without cleaning up)
exit
causes normal program termination with cleaning up
_Exit
causes normal program termination without cleaning up (C99)
atexit
registers a function to be called on exit() invocation
quick_exit
causes normal program termination without cleaning up, but with IO buffers flushed (C11)
at_quick_exit
registers a function to be called on quick_exit() invocation
Communicating with the environment
getenv
accesses the list of the environment variables
system
calls the host environment's command processor
Referencesedit
^Crawford, Tony; Peter Prinz (December 2005). C in a Nutshell. §16.11 – Process Control: O'Reilly. p. 618. ISBN0-596-00697-7.{{cite book}}: CS1 maint: location (link)
^ISO/IEC 9899:1999 specification(PDF). p. 315, § 7.20.4 "Communication with the environment". Retrieved 25 November 2011.
External linksedit
Wikibooks has a book on the topic of: C Programming/C Reference
April 14, 2024
process, control, refers, group, functions, standard, library, programming, language, implementing, basic, process, control, operations, process, control, operations, include, actions, such, termination, program, with, various, levels, cleanup, running, extern. 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 editThe process control functions are defined in the stdlib h header cstdlib header in C Function DescriptionTerminating a program abort causes abnormal program termination without cleaning up exit causes normal program termination with cleaning up Exit causes normal program termination without cleaning up C99 atexit registers a function to be called on exit invocationquick exit causes normal program termination without cleaning up but with IO buffers flushed C11 at quick exit registers a function to be called on quick exit invocationCommunicating withthe environment getenv accesses the list of the environment variablessystem calls the host environment s command processorReferences edit Crawford Tony Peter Prinz December 2005 C in a Nutshell 16 11 Process Control O Reilly p 618 ISBN 0 596 00697 7 a href Template Cite book html title Template Cite book cite book a CS1 maint location link ISO IEC 9899 1999 specification PDF p 315 7 20 4 Communication with the environment Retrieved 25 November 2011 External links edit nbsp Wikibooks has a book on the topic of C Programming C Reference Retrieved from https en wikipedia org w index php title C process control amp oldid 1126867043 getenv, wikipedia, wiki, book, books, library,