I do not not how to make stable Zombis process, but intermediately it will be
made...in the output of following program.
#include<stdio.h>
#include<signal.h>
int main() {
int pid,i;
int temppid=-2, tempppid=-2;
for (i = 0 ; i <= 2 ; ++i){
pid = fork();
if(i==2)exit(0);
if(pid > 0)
printf("\n parent : PID : - %d , PPID :- %d",getpid(),getppid());
else if(pid == 0){
fork();
fork();
temppid = getpid();
tempppid = getppid();
if(tempppid == 1)
printf("\n This is going zombie : PID = %d ",temppid);
printf("\n child : PID : - %d , PPID :- %d",temppid,tempppid);
}
}
return 0;
}
Rajesh P Jain wrote:
> Greetings,
>
> Could anyone please tell me "HOW" to create the Zombie Processess?
>
> As, I want to find whether there are any Zombie Processes running
>(That has been already posted in the list)> So, I just needed to know that How to
>create the Zombie Processes.
>
> Thanks In Advance
>
> With Regards
> Rajesh P Jain
>
> ------------------------------------------------------------------------
>
> Part 1.2 Type: application/ms-tnef
> Encoding: base64
--
|-------------------------------------------------|
| GAURAV |
|-------------------------------------------------|
| Please feel free to |
| mailto:[EMAIL PROTECTED] (Office Email-id) |
| or (at Other Email-ids) |
| mailto:[EMAIL PROTECTED] |
| mailto:[EMAIL PROTECTED] |
|-------------------------------------------------|
| L o v e r o f 1 I N U X |
| Open Invit to all....to talk on 1INUX |
|-------------------------------------------------|