| www.delorie.com/gnu/docs/glibc/libc_557.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The usual way for a program to terminate is simply for its main
function to return. The exit status value returned from the
main function is used to report information back to the process's
parent process or shell.
A program can also terminate normally by calling the exit
function.
In addition, programs can be terminated by signals; this is discussed in
more detail in 24. Signal Handling. The abort function causes
a signal that kills the program.
25.6.1 Normal Termination If a program calls exit, a process terminates normally.25.6.2 Exit Status The exit statusprovides information about why the process terminated.25.6.3 Cleanups on Exit A process can run its own cleanup functions upon normal termination. 25.6.4 Aborting a Program The abortfunction causes abnormal program termination.25.6.5 Termination Internals What happens when a process terminates.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |