From 53fa3d03dab8fe20dc4655820faf88172c82db53 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Thu, 27 Feb 2020 16:46:47 +0200 Subject: [PATCH] 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. --- src/bin.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin.rs b/src/bin.rs index ba738ed0..6ecdafe0 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -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); }