diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-24 20:22:29 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-24 20:22:29 +0000 |
commit | 28cda01b7c4a10cca2ba565766595797fb0f7b72 (patch) | |
tree | d7c75491ffe0100a81eb367507524c637dfe9f56 /res/res_agi.c | |
parent | 84191d1d03289bb9010a52f4d9974aa20539274a (diff) |
Fix FastAGI to not wait for the non-existant pid
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46141 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 005f1878c..686b17ddd 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1869,7 +1869,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; |