Notify embedded terminal on embedded process exit

When an embedded process exits the main process receives a SIGCHLD. The
check on whether the embedded process is alive is done on input, so
forward an input of '\0' to get the embedded terminal to notice its
child is dead.
async
Manos Pitsidianakis 2020-02-27 16:46:47 +02:00
parent 126b65817e
commit 53fa3d03da
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 5 additions and 0 deletions

View File

@ -528,6 +528,11 @@ fn run_app() -> Result<()> {
state.redraw();
}
},
signal_hook::SIGCHLD => {
state.rcv_event(UIEvent::EmbedInput((Key::Null, vec![0])));
state.redraw();
}
other => {
debug!("got other signal: {:?}", other);
}