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.
This commit is contained in:
Manos Pitsidianakis 2020-02-27 16:46:47 +02:00
parent 126b65817e
commit 53fa3d03da
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

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);
}