[asterisk-commits] file: trunk r92199 - /trunk/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 10 10:07:33 CST 2007


Author: file
Date: Mon Dec 10 10:07:33 2007
New Revision: 92199

URL: http://svn.digium.com/view/asterisk?view=rev&rev=92199
Log:
Only send a SIGHUP if the pid is greater than -1, otherwise all PIDs greater than -1 will get the SIGHUP... and that is bad.
(closes issue #11453)
Reported by: alanmcmillan

Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=92199&r1=92198&r2=92199
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Mon Dec 10 10:07:33 2007
@@ -2208,7 +2208,8 @@
 		if (needhup) {
 			needhup = 0;
 			dead = 1;
-			kill(pid, SIGHUP);
+			if (pid > -1)
+				kill(pid, SIGHUP);
 		}
 		ms = -1;
 		c = ast_waitfor_nandfds(&chan, dead ? 0 : 1, &agi->ctrl, 1, NULL, &outfd, &ms);




More information about the asterisk-commits mailing list