Talk:Zombie process
From Wikipedia, the free encyclopedia
Bravo to the writers of this page. Made me laugh.
- include <stdio.h>
main() {
int pid; pid=fork(); /* Duplicate */ if (pid!=0) /* Branch based on return value from fork() */ { while (1) /* never terminate, and never execute a wait() */ sleep(1000); } else { exit(42); /* Exit with a silly number */ }
}
[edit] ====================================
How to kill a zombie (defunct) process
[edit] ====================================
How to Kill Zombie Processes.
Go for the throat kill the parent. (as root of cource)
1. Find the parent process
ps -elf | grep defunct
Sample Results
0 Z qmailq 5553 5520 0 76 0 - 0 unct> Jul17 ? 00:00:00 [qmail-queue <defunct>]
0 Z qmailq 17408 17406 0 76 0 - 0 unct> Jul18 ? 00:00:00 [qmail-queue <defunct>]
0 Z qmailq 28605 28445 0 76 0 - 0 unct> Sep02 ? 00:00:00 [qmail-queue <defunct>]
0 S root 24007 22717 0 76 0 - 1148 pipe_w 13:43 pts/3 00:00:00 grep defun
2. Kill the parent
kill 5520 17406 28445
Note: If the parent process is 1 just reboot.
[edit] Wikilinking
Some of the links used seem quite irrelevant, such as Grim Reaper, adoption, and death. I don't know of any cleanup templates for this and {{cleanup}} seems to generic. I'll go look on WP:TC and see if I can find anything. --Thinboy00's sockpuppet alternate account 19:10, 29 March 2008 (UTC)