summaryrefslogtreecommitdiff
path: root/cgi.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-03 22:45:18 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-03 22:45:18 +0100
commitaf526c6c2ede713237048a91aaddfa2ce621dc3c (patch)
treee31196f04badda899cd79937cb4afd0caf741187 /cgi.c
parentb7c85a2819b3869279a669d5681f574824589c6c (diff)
use pipes instead of a socketpair, EOF handling is broken with sockets
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cgi.c b/cgi.c
index 02665d8..ad280cd 100644
--- a/cgi.c
+++ b/cgi.c
@@ -36,14 +36,11 @@ void uh_interpreter_add(const char *ext, const char *path)
list_add_tail(&in->list, &interpreters);
}
-static void cgi_main(struct client *cl, struct path_info *pi, int fd)
+static void cgi_main(struct client *cl, struct path_info *pi)
{
const struct interpreter *ip = pi->ip;
struct env_var *var;
- dup2(fd, 0);
- dup2(fd, 1);
- close(fd);
clearenv();
setenv("PATH", conf.cgi_path, 1);