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

Re: how to kill a subprocess nicely?



	After a long period (approx. 7 days) of silence,
	here I come again...

On Mon, Aug 02, 1999 at 10:15:01AM +0200, Thomas Niederreiter wrote:
| ...
| In my GTK-App I start a subprocess via fork and
| execl("/bin/sh", "sh", "-c", cmd ,NULL)
| 
| ...
| I tried to send an SIGINT via kill-command to the pid I get back from
| the fork (which is the /bin/sh...). But the Shell does not pass this
| signal to its child (my subprocess). 

Actually most shells will use SIGINT for other purposes, not for "dying".
A better way to kill a process would be to send it a SIGTERM first, then
wait for a while, and send it a SIGKILL.

-- 
Giorgos Keramidas, <keramida@ceid.upatras.gr>
"Today is not yesterday's tomorrow, but tomorrow's yesterday."



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