From: Fredrik Tolf Date: Tue, 7 Mar 2017 02:24:17 +0000 (+0100) Subject: callcgi: Fixed possible deadlock problem on aborted requests. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=883200a82ac56d6671ad9fb2942e1db2e271e84a;p=ashd.git callcgi: Fixed possible deadlock problem on aborted requests. --- diff --git a/src/callcgi.c b/src/callcgi.c index 67a6d14..2b1c9e6 100644 --- a/src/callcgi.c +++ b/src/callcgi.c @@ -436,6 +436,7 @@ int main(int argc, char **argv, char **envp) printf("\n"); if(passdata(out, stdout)) kill(child, SIGINT); + fclose(out); if(waitpid(child, &estat, 0) == child) { if(WCOREDUMP(estat)) flog(LOG_WARNING, "CGI handler `%s' dumped core", prog.b[0]);