LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 04: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, 05:44 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration