aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 20:30:25 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-24 20:30:25 +0000
commit3ffb3ce9b3e8760e723c7bb73826ecde4a5894a8 (patch)
tree8c34e523bf1f30111c75bab8d673ee568a6d20b2 /res/res_agi.c
parent4be24337a6628403ae31f8bcf1dc32e00af47646 (diff)
Fix FastAGI when there is no pid (bug #7628, #8147)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46142 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 736cea394..de9fd3151 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1868,7 +1868,8 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi
returnstatus = -1;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "AGI Script %s completed, returning %d\n", request, returnstatus);
- waitpid(pid, status, 0);
+ if (pid > 0)
+ waitpid(pid, status, 0);
/* No need to kill the pid anymore, since they closed us */
pid = -1;
break;