summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorSantiago Piccinini <spiccinini@altermundi.net>2019-10-10 17:26:48 -0300
committerDaniel Golle <daniel@makrotopia.org>2020-06-03 10:42:58 +0100
commit939c281c70ef82929ffcb3cb383fd6fdc40f341b (patch)
tree3013c6c9f2d5a5a255e6a484867cfa7eb96d60a8 /proc.c
parent5e9c23c6f40ff26209ef22cfeeda4904a5918f3d (diff)
downloaduhttpd2-939c281c70ef82929ffcb3cb383fd6fdc40f341b.tar.gz
proc: do not cancel 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 <spiccinini@altermundi.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index 1d63d86..2b69703 100644
--- a/proc.c
+++ b/proc.c
@@ -225,11 +225,9 @@ static void proc_handle_header(struct relay *r, const char *name, const char *va
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),