signal to a sleeping process...



hi ,

in the followin code ..parent forks and sleeps .
the child immediately sends a kill signal to the parent

#1.the parent exits immediately ..!
#2. shoudlnt the parent sleep for the specified time and after it wakes
up , KERNEL 'sees' the signal(KILL) bit set and then kill the
process...

please clear this diema..
regards and thanks

***************code*************

///assume all the necessary files included

int main()
{
pid_t pid =fork();

if(pid==0) //if child
{
pid_t parentpid=getppid();
kill(parenpid,9);
}
else
{
sleep(100);
}

return 0;
}

.



Relevant Pages