Commit cac7d254 authored by Geoff Simmons's avatar Geoff Simmons

Bugfix polling for stderr.

parent 56877d54
# looks like -*- vcl -*-
varnishtest "vdp error handling"
shell "rm -f ${tmpdir}/foo"
server s1 {
rxreq
txresp -body {foo bar baz quux}
} -start
varnish v1 -vcl+backend {
import ${vmod_pipe};
sub vcl_init {
new cat = pipe.vdp(path="${cat}");
cat.arg("${tmpdir}/foo");
}
sub vcl_deliver {
set resp.filters = "cat";
}
} -start
client c1 {
txreq
rxresp -no_obj
} -run
logexpect l1 -v v1 -g vxid -d 1 -q Error {
expect 0 * Begin {^req \d+ rxreq$}
expect * = Error {^vdfp_pipe: vdp cat: ${cat} stderr}
expect * = End
} -run
......@@ -198,7 +198,7 @@ vdp_init(struct req *req, void **priv)
state->chldpid = -1;
state->fds[STDIN_FILENO].events = POLLOUT;
state->fds[STDOUT_FILENO].events = POLLIN;
state->fds[STDERR_FILENO].events = POLLOUT;
state->fds[STDERR_FILENO].events = POLLIN;
argv = obj->argv;
/* Hackishly using non-API knowledge of VRT_priv_task() */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment