Go Back   The UNIX and Linux Forums > Top Forums > Programming
.
google site



Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-20-2001
Registered User
 

Join Date: Sep 2001
Location: Johnston, Iowa
Posts: 7
Question Zombie Files on a HP-UX

How can you find a zombie file on the system. I have been in the database side of the system to search for Orphan files removed the orphan files, but still got the zombie file. When you run a top command it says there is a zombie process that is running i would like to find it. How can i do that?

Thanks
Sponsored Links
  #2 (permalink)  
Old 12-20-2001
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
A zombie process is created when a parent process dies without cleaning up its children properly. AFAIK there is nothing you can do to clean them up after the fact except reboot. They generally dont cause any harm though. If you are seeing many zombies you should investigate which program is causing them and fix the problem.
  #3 (permalink)  
Old 12-20-2001
Registered User
 

Join Date: Sep 2001
Location: Johnston, Iowa
Posts: 7
Thank you that is what i thought but was not too sure and i am not going to kill it since it is my complete database that caused this zombie process.

Thanks
  #4 (permalink)  
Old 12-20-2001
Registered User
 

Join Date: Dec 2001
Posts: 6
About zombie processes, I have several opinion.

1) The cause lead to generation of zombie is, when the child processes stop (as you know, a signal of SIGCHLD will be sent to the father process), normally the father should do something with the signal SIGCHLD with the system call wait() or waitpid(). But if the father process encounters a logical error in his internal procedure. certainly the signal SIGCHLD is blocked. so the father can not release the resource occupied by his child processes. you can run 'ps -ef|grep defunct' to search all the zombies.

2) To solve this problem. you can kill the father process of all the dufunct processes. the initial process 'init' will release all the zombies automaticlly.

Another thing, I am from China. So my english language may be not good enough to interpret all your doubtness! Thank you!
  #5 (permalink)  
Old 12-21-2001
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,148
I basicly agree with WayneYang. Every time you see a zombie on ps, look at the ppid field to find the parent program that is ignoring the death of its children. That program really has a bug and it should be fixed. And if you kill that parent, init will inherit the zombies and reap them.

But there is nothing wrong with ignoring SIGCHLD. Lots of well behaved programs simply issue the wait() call at the proper time.
  #6 (permalink)  
Old 01-15-2002
Registered User
 

Join Date: Nov 2001
Posts: 1
try this:

while ((ret = waitpid((pid_t)-1, &status, WNOHANG)) != 0) {
printf("ret : %d", ret);
}

put this in your main loop and it will remove all defunct processes.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
zombie process jeenat Linux 5 03-28-2008 07:36 AM
Daemon...Zombie?? Please help me Kacyndra Programming 3 05-10-2005 10:40 AM
Zombie process swhitney UNIX for Advanced & Expert Users 2 10-22-2004 06:12 PM
zombie program merlin UNIX for Dummies Questions & Answers 8 11-14-2002 11:31 AM
Zombie process orca UNIX for Dummies Questions & Answers 8 04-26-2002 03:54 PM



All times are GMT -4. The time now is 02:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0