diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-04 03:15:00 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-04 03:15:00 +0100 |
commit | ecce95627c67220610741ca6bc5359c477a26e0e (patch) | |
tree | 92b54df1023072c06178caafc2922bd8cb25bf43 | |
parent | e446c68fb59eb6b413fdb6a3043b38fbfa2f8a43 (diff) |
ensure the cgi postdata write pipe is closed for other processes
-rw-r--r-- | proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -168,7 +168,11 @@ struct env_var *uh_get_process_vars(struct client *cl, struct path_info *pi) static void proc_close_fds(struct client *cl) { - close(cl->dispatch.proc.r.sfd.fd.fd); + struct dispatch_proc *p = &cl->dispatch.proc; + + close(p->r.sfd.fd.fd); + if (p->wrfd.fd >= 0) + close(p->wrfd.fd); } static void proc_handle_close(struct relay *r, int ret) |