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:
parent
92d0d75716
commit
10f787881d
1 changed files with 6 additions and 0 deletions
6
exec.c
6
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
|
||||
|
|
Loading…
Add table
Reference in a new issue