Code for PROGRAM FOR ZOMBIE PROCESS in C Programming
#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]$ cc zombie.c
[04mca58@LINTEL 04mca58]$ ./a.out
I am child
Parent will sleep
[04mca58@LINTEL 04mca58]$