Operating System - HP-UX
1747983 Members
4370 Online
108756 Solutions
New Discussion юеВ

Re: Killing parent process

 
SOLVED
Go to solution
Manoj1
Advisor

Killing parent process

Hi all,

We usually kill child process. In what scenario Parent process should be killed instead of Child process ?

Thanks,
Manoj
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: Killing parent process

One case is when the child is a zombie you need to kill the zombie master.

You may want to kill the parent if the parent will just turn around and create new children.

But as in most cases, it depends.
Manix
Honored Contributor

Re: Killing parent process

Generally we dont kill parent as child will be zombie ,we may try to kill parent it its forking to much or may be for abrupt shutdown .

You may read about Zombie in the excellent quote given in the thread below.

http://h30499.www3.hp.com/t5/System-Administration/Question-on-defunct-zombie-process-UX/m-p/4004591#M297832


A zombie process is a process which has died and whose parent process is still running and has not wait()ed for it. In other words, if a process becomes a zombie, it means that the parent process has not called wait() or waitpid() to obtain the child process's termination status. Once the parent retrieves a child's termination status, that child process no longer appears in the process table.

You cannot kill a zombie process, because it's already dead. It is taking up space in the process table, and that's about it.

If any process terminates before its children do, init inherits those children. When they die, init calls one of the wait() functions to retrieve the child's termination status, and the child disappears from the process table.

A zombie process is not, in and of itself, harmful, unless there are many of them taking up space in the process table. But it's generally bad programming practice to leave zombies lying around, in the same way
that it's generally a Bad Thing to never bother to free memory you've malloc()ed.
..

HP-UX been always lovable - Mani Kalra
Dennis Handly
Acclaimed Contributor

Re: Killing parent process

>Manix: Generally we don't kill parent as child will be zombie

No, it becomes an orphan, see glossary(9).

>You may read about Zombie in the excellent quote given in the thread below.

Yes, it does mention orphans and I mention "zombie master".