callcgi: Fixed possible deadlock problem on aborted requests.
[ashd.git] / src / callcgi.c
index 67a6d14..2b1c9e6 100644 (file)
@@ -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]);