exec: close stdout and stderr streams on child signal

This prevents timing out ubus call when the child invokes further detached
childs inheriting stdio descriptors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-05-08 20:43:00 +02:00
parent 92d0d75716
commit 10f787881d

6
exec.c
View file

@ -175,6 +175,12 @@ rpc_exec_process_cb(struct uloop_process *p, int stat)
ustream_poll(&c->opipe.stream);
ustream_poll(&c->epipe.stream);
close(c->opipe.fd.fd);
close(c->epipe.fd.fd);
ustream_poll(&c->opipe.stream);
ustream_poll(&c->epipe.stream);
}
static void