Child process
A child process in computing is a process created by another process (the parent process). This technique pertains to multitasking operating systems, and is sometimes called a subprocess or traditionally a subtask.
There are two major procedures for creating a child process: the fork system call (preferred in Unix-like systems and the POSIX standard) and the spawn (preferred in the modern (NT) kernel of Microsoft Windows, as well as in some historical operating systems).
History
Child processes date to the late 1960s, with an early form in later revisions of the
Children created by fork
A child process inherits most of its
Each process may create many child processes but will have at most one parent process; if a process does not have a parent this usually indicates that it was created directly by the
The SIGCHLD
Children created by spawn
This section needs expansion. You can help by adding to it. (February 2014) |
End of life
When a child process terminates, some information is returned to the parent process.
When a child process terminates before the parent has called wait, the kernel retains some information about the process, such as its exit status, to enable its parent to call wait later.[2] Because the child is still consuming system resources but not executing it is known as a zombie process. The wait system call is commonly invoked in the SIGCHLD handler.
See also
- exit
- pstree, for UNIX to find the child process (pstree PID, where PID is the process id of the process).
References
- The Single UNIX Specification, Version 4 from The Open Group
- ^ Linux Programmer's Manual – System Calls : wait for process to change state –
- ^ "The Linux kernel: Signals". Win.tue.nl. Retrieved 2014-04-30.
- ^ [1] Archived September 29, 2011, at the Wayback Machine
- ^ Linux Programmer's Manual – System Calls : examine and change a signal action –