[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kill the child process



* Shao Zhang <shao@cia.com.au>:
> 	In my C program, I have created a child process to do some timeout
> 	stuff in case something goes wrong.
> 
> 	But when I exit the main program, how do I kill this child process
> 	since I no longer need it??
> 
> 	I have checked the man page for wait... but is there anyway to
> 	instantly kill this child process??
Have a look at 'man 2 kill' instead. The PID is the returnvalue from fork.

-- 
Ulrik Haugen <qha@lysator.liu.se>
"I contend that we are both atheists. I just believe in one fewer god than you
do. When you understand why you dismiss all the other possible gods, you will
understand why I dismiss yours." -- Stephen Roberts


Reply to: