Re: [OpenWrt-Devel] [PATCH] proc: cancel script killing only if process ends
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Hi ynezz thanks for bringing this conversation to the list! On 2/11/20 10:44 AM, Petr Štetiar wrote: > Santiago Piccinini [2019-10-10 18:35:53]: > > Hi, > >> 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. > > < jow> well it is a change in behaviour > < jow> the proper solution would be introducing a separate read timeout I > guess. Thats how other servers handle it > < jow> one timeout until the first content, then another body read timeout The rationale behind adding another timeout is to maintain behavior (using an infinite default timeout for the new timeout) ? In my opinion another timeout adds more complexity than value if backwards compatibility is not taken in consideration. Anyhow, I can implement separate timeouts but if the patch will be accepted. Maybe something like script_timeout_abort or script_abort_timeout for the name? Best! SAn --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] proc: cancel script killing only if process ends
Santiago Piccinini [2019-10-10 18:35:53]: Hi, > 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. < jow> well it is a change in behaviour < jow> the proper solution would be introducing a separate read timeout I guess. Thats how other servers handle it < jow> one timeout until the first content, then another body read timeout -- ynezz ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] proc: cancel script killing only if process ends
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Hi! I forgot to mention that this patch is for uhttpd. Best! SAn --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] proc: cancel script killing only if process ends
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- 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 --- proc.c | 2 -- 1 file changed, 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), -- 2.23.0 --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel