signal to a sleeping process...
- From: "al pacino" <siddharthdave84@xxxxxxxxx>
- Date: 6 Sep 2006 01:41:16 -0700
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;
}
.
- Follow-Ups:
- Re: signal to a sleeping process...
- From: "Nils O. Selåsdal"
- Re: signal to a sleeping process...
- Prev by Date: Re: Threads Vs Forks in Embedded Environment
- Next by Date: Re: (char *)0 vs NULL
- Previous by thread: Detecting socket state?
- Next by thread: Re: signal to a sleeping process...
- Index(es):
Relevant Pages
|