summaryrefslogtreecommitdiff
path: root/relay.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-19 19:06:25 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-19 19:31:21 +0100
commit3560e89406c81814254bdb45db19498387265cb7 (patch)
tree7f59528922a1f9c4c1d5f1e5d8823df02d8b965a /relay.c
parent78f9f35e22c60d5748f0d69a202ca541c517f0bb (diff)
implement support for script timeout for cgi/lua
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'relay.c')
-rw-r--r--relay.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/relay.c b/relay.c
index 09f53a1..5de5cb4 100644
--- a/relay.c
+++ b/relay.c
@@ -162,6 +162,15 @@ static void relay_proc_cb(struct uloop_process *proc, int ret)
relay_close_if_done(r);
}
+void uh_relay_kill(struct client *cl, struct relay *r)
+{
+ struct ustream *us = &r->sfd.stream;
+
+ kill(r->proc.pid, SIGKILL);
+ us->eof = true;
+ ustream_state_change(us);
+}
+
void uh_relay_open(struct client *cl, struct relay *r, int fd, int pid)
{
struct ustream *us = &r->sfd.stream;