diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-10 16:07:33 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-10 16:07:33 +0000 |
commit | 2234c364d9a0ae7f26da17861bb3c22453818a0e (patch) | |
tree | 476e3ce51518dfb182573d1d7bd957a8f535a825 /res/res_agi.c | |
parent | c08c9c7a7df28365209ec4d0d6cb0314e5ec707b (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@92199 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 9d08359fe..cf84bb9c3 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); |