According to wikipedia, a zombie process is a process that has completed executing, but still has an entry in the process table. In other words, a zombie process has finished executing, but it hasn't been cleaned up yet.
When a process finishes, its return code needs to be returned to the parent process. Normally, this happens immediately, so you don't see the zombie process. However, sometimes, the parent process doesn't cooperate, and the zombie stays in the process table indefinitely.
If you want to get rid of a zombie process, you have three options:
- Wait. Hopefully it'll clear up on its own.
- Send a SIGCHLD to the zombie's parent. If it's behaving correctly, it'll fetch the return code of the zombie process, and the system can then reap the zombie process.
- Kill the parent process. When you kill a process, its children are adopted by init, which will clean everything up for you.