LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-21-2008, 03:34 AM   #1
vijaya_svk
Member
 
Registered: Nov 2007
Posts: 61

Rep: Reputation: 15
how to identify a zombie process and control it after parent dies


Hi
I have created a zombie process using fork,
and i am viewing the processes using
$ps -al
fedora@fedora-vm vijay]$ ps -al
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 S 500 2893 2752 0 80 0 - 11193 - pts/4 00:00:09 gedit
1 R 500 4852 1 60 80 0 - 414 - pts/4 00:02:37 a.out
0 R 500 4914 4853 1 80 0 - 1134 - pts/1 00:00:00 ps[/SIZE][/SIZE]

The PPID which is having the value 1 is the zombie process,
Can we say any PPID having 1 is a zombie process or does it represent Zombie with any symbol or any other identification?


Can we have any command over zombie process other than killing it?
 
Old 01-21-2008, 04:44 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,984
Blog Entries: 54

Rep: Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742
Quote:
Originally Posted by vijaya_svk View Post
I have created a zombie process using fork,
No, you haven't ;-p


Quote:
Originally Posted by vijaya_svk View Post
viewing the processes using $ps -al
This is easier:
Code:
/bin/ps ax -eostate,pid,ppid --sort=state 2>/dev/null | grep ^Z

Quote:
Originally Posted by vijaya_svk View Post
Can we have any command over zombie process other than killing it?
Technically it isn't a process any more but "just" an entry in the process table consuming almost no system resources. Control is handled by 'init'.
 
  


Reply


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
Bash child process in foreground while parent dies kborgnis Programming 3 11-09-2007 06:50 AM
how parent process can control it's child? sluge Linux - General 2 08-02-2007 04:31 AM
TCL/expect - parent hangs when child dies Hewson Programming 1 03-27-2007 08:44 PM
child process usses same amount of ram as parent process socialjazz Programming 7 10-19-2006 05:48 PM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM


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

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