commit 1e6afc1a9ab22bba105191c2905d95aec7558e00 (HEAD -> fix_cgi_script_timeout) Author: Santiago Piccinini Date: Thu Oct 10 17:26:48 2019 -0300 do not cancell script killing after writing headers Before this change if the cgi script hangs after writing headers then the process will never be killed. Let's only cancel the timeout if the process ends. Signed-off-by: Santiago Piccinini --- a/proc.c +++ b/proc.c @@ -225,11 +225,9 @@ static void proc_handle_header(struct re static void proc_handle_header_end(struct relay *r) { struct client *cl = r->cl; - struct dispatch_proc *p = &cl->dispatch.proc; struct blob_attr *cur; int rem; - uloop_timeout_cancel(&p->timeout); uh_http_header(cl, cl->dispatch.proc.status_code, cl->dispatch.proc.status_msg); blob_for_each_attr(cur, cl->dispatch.proc.hdr.head, rem) ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur), blobmsg_data(cur));