Home » NO IDEA » Zombie Process

Zombie Process

Blog Stats

  • 13,912 hits
April 2013
M T W T F S S
« Mar   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

ZOMBIE PROCESS /* no wait issued by parent though child is dead */
#include<stdio.h>
main()
{
int id;
id=fork();
}
if(id>0)
{
printf("Parent will sleep");
sleep(10);
}
if(id==0)
printf("I am child");
OUTPUT
***********
[04mca58@LINTEL 04mca58]$
[04mca58@LINTEL 04mca58]$
I am child
Parent will sleep
[04mca58@LINTEL 04mca58]$
cc zombie.c
./a.out

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: