diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-19 19:06:25 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-19 19:31:21 +0100 |
commit | 3560e89406c81814254bdb45db19498387265cb7 (patch) | |
tree | 7f59528922a1f9c4c1d5f1e5d8823df02d8b965a /relay.c | |
parent | 78f9f35e22c60d5748f0d69a202ca541c517f0bb (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.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; |