Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Child process
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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 (system call)|wait]], the kernel retains some information about the process, such as its [[exit status]], to enable its parent to call ''wait'' later.<ref name="man2wait">{{man|2|wait|Linux|wait for process to change state}}</ref> 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. [[POSIX.1-2001]] allows a parent process to elect for the kernel to automatically reap child processes that terminate by explicitly setting the disposition of SIGCHLD to SIG_IGN (although ignore is the default, automatic reaping only occurs if the disposition is set to ignore explicitly<ref>{{cite web|url=http://www.win.tue.nl/~aeb/linux/lk/lk-5.html#ss5.5 |title=The Linux kernel: Signals |publisher=Win.tue.nl |date= |accessdate=2014-04-30}}</ref>), or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal. Linux 2.6 kernels adhere to this behavior, and FreeBSD supports both of these methods since version 5.0.<ref>[http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?signal+3] {{webarchive|url=https://web.archive.org/web/20110929182629/http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?signal+3|date=September 29, 2011}}</ref> However, because of historical differences between [[System V]] and [[BSD]] behaviors with regard to ignoring SIGCHLD, calling ''wait'' remains the most portable paradigm for cleaning up after forked child processes.<ref>{{man|2|sigaction|Linux|examine and change a signal action}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)