diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-05-08 20:43:00 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-05-08 20:47:17 +0200 |
commit | 10f787881da2dc6aac261a2ee3b5eedc0f8b5b54 (patch) | |
tree | dabf8577b82cd9238e079124e71feb86ef34603f | |
parent | 92d0d757161d1950f11abb6e679bfdafa7cbfe85 (diff) | |
download | rpcd-10f787881da2dc6aac261a2ee3b5eedc0f8b5b54.tar.gz |
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>
-rw-r--r-- | exec.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |