From 9178e4223eae460fc85dbc9fe515d3cf1490f9f3 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 24 Oct 2006 20:22:29 +0000 Subject: [PATCH] Fix FastAGI to not wait for the non-existant pid git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46141 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_agi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/res_agi.c b/res/res_agi.c index 005f1878cd..686b17ddd2 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; -- 2.47.2