Linux Zombie Process

Source: Internet
Author: User
Tags function prototype
Wait function

pid_t Wait (int *status);//function prototype

Header Files <sys/types.h>, <sys/wait.h>

Once the process has called wait, it blocks itself immediately, and the wait automatically parses whether a child process of the current process has exited, and if it finds such a child process that has become a zombie, wait collects information about the child process and destroys it and returns it completely; Wait will always be stuck here until one appears.

A signal from the sigchldsigchld,linux.
When a process terminates or stops, the SIGCHLD signal is sent to its parent process. The system ignores this signal by default. This signal should be captured if the parent process wishes to be informed of this state of its child processes. The wait function is typically called in the capture function of the signal to obtain the process ID and its terminating state.
After the parent process dies, all its child processes are passed on to the Init process, and the INIT process becomes a new process for that zombie process, and the INIT process periodically calls the wait system call to clear its zombie child.
You cannot use kill to pick up the SIGKILL signal. This command kills the zombie process as if it were a normal process, because the zombie process is a dead process and it can no longer receive any signals. In fact, if there are not many zombie processes in the system, we do not need to eliminate them, and a few zombie processes do not have any effect on the performance of the system.




Linux Zombie Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.