From: Joshua Colp Date: Mon, 10 Dec 2007 16:07:33 +0000 (+0000) Subject: Only send a SIGHUP if the pid is greater than -1, otherwise all PIDs greater than... X-Git-Tag: 1.6.0-beta1~3^2~471 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ebf3afe0225fa6b42f0a004d5353f996d856b05;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92199 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_agi.c b/res/res_agi.c index 9d08359fea..cf84bb9c38 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2208,7 +2208,8 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi 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);