![]() |
| | #1 |
| Registered User Join Date: Feb 2008
Posts: 1
| zombie to exist after the termination of main program.. Code: main()
{
pid_t child;
child=fork();
if(child > 0)
{sleep(60);
}
else
{exit(0);
}
}
the above code will create zombie process,which will be adopted by init as soon as parent process will dies.Can any one gimme a code or an alogrithm to keep this zombie proocess alive even after its parent dies...i.e to stop init from adopting it after the termination of main programme
|
| anilchowdhury is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem comparing variables from my main program into my subprogram | Raschoc | C++ Programming | 4 | 03-16-2009 08:44 AM |
| Abnormal program termination | Kayoss | C++ Programming | 3 | 05-16-2006 03:29 PM |
| C program without main() | satish_ram | C Programming | 5 | 09-18-2001 06:24 AM |