From 10f787881da2dc6aac261a2ee3b5eedc0f8b5b54 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 8 May 2018 20:43:00 +0200 Subject: [PATCH] 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 --- exec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exec.c b/exec.c index 8b2f8d1..f7bfcb2 100644 --- a/exec.c +++ b/exec.c @@ -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 -- 2.25.1