Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Parallel Processing ProgramsRSS Feeds

PROGRAM FOR ZOMBIE PROCESS

Posted By: Alfonsine Miller     Category: C Programming     Views: 10547

PROGRAM FOR ZOMBIE PROCESS.

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]$ 
 
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM FOR ZOMBIE PROCESS Or get search suggestion and latest updates.

Alfonsine Miller
Alfonsine Miller author of PROGRAM FOR ZOMBIE PROCESS is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!