Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-21-2003, 07:45 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 6

Rep: Reputation: 0
Question Zombie Process Handling

Is there a special meachanism in Linux to handle Zombie Processes?
Old 07-21-2003, 07:49 AM   #2
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
what exactly is your question?
if you are asking if the kernel sees if a parent process is waiting
for a child process it forked, then no....i dont think so..
if your parent doesnt wait for a child process and the child exits,
it (child) would become a zombie...a condition that would go either when the parent process exits or when the system restarts
Old 07-21-2003, 10:10 AM   #3
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
Below is Beej's code snip and explanation for handling zombies under any *nix. Seems to work if you include the right headers.

        sa.sa_handler = sigchld_handler; // reap all dead processes
        sa.sa_flags = SA_RESTART;
        if (sigaction(SIGCHLD, &sa, NULL) == -1) {
(Also, this whole sigaction() thing might be new to you--that's ok. The code that's there is responsible for reaping zombie processes that appear as the fork()ed child processes exit. If you make lots of zombies and don't reap them, your system administrator will become agitated.)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zombie Process N|k0N Linux - Security 8 09-22-2007 03:01 AM
Zombie process - XMMS FeaRx Debian 3 11-04-2005 04:27 AM
Zombie process - gnomerc Artik Mandriva 0 05-10-2005 02:45 AM
zombie process ihatecomputers Linux - Software 2 03-24-2005 08:09 AM
Zombie process and dialup pbm Linux - General 2 06-27-2002 11:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration