Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by kfkfgsffg ( 9 years ago )
#include<iostream>
#include<unistd>
#include<stdlib>
using namespace std;
int main()
{
int pid = getpid();
cout << "i am Process: " << pid << endl;
cout << "[Forking child Process...]" << endl;
pid = fork();
if ( pid < 0)
{
exit(0);
}
else if (pid == 0)
{
cout << "Child Process Started." << endl;
usleep(500000);
cout << "I am in Zombie State" << endl;
cout << pid << endl;
execl("/bin/pid",NULL);
while (1)
{
}
}
return 0;
}
Revise this Paste