- A process enters the exiting state for one of the
following reasons:
- normal completion: Once a process executes its final instruction, a call to exit() is made.
- abnormal termination: programming errors.
- run time.
- I/O.
- user intervention.
- Even if the user did not program in a call to exit(), the compiler will have appended one to int main()
- The final result of the process from its int main() is returned to the parent, with a call to wait() if necessary.
- Process' resources are deallocated by operating system.
- Parent may terminate execution of children processes (abort)
- Child has exceeded allocated resources.
- Task assigned to child is no longer required.
- Parent is exiting
- Operating system does not allow child to continue if its parent terminates.
- Cascading termination.
Cem Ozdogan
2004-03-13