aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/event_loop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/event_loop.rs')
-rw-r--r--alacritty_terminal/src/event_loop.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs
index 42025b00..929c642d 100644
--- a/alacritty_terminal/src/event_loop.rs
+++ b/alacritty_terminal/src/event_loop.rs
@@ -259,7 +259,11 @@ where
for event in events.iter() {
match event.key {
tty::PTY_CHILD_EVENT_TOKEN => {
- if let Some(tty::ChildEvent::Exited) = self.pty.next_child_event() {
+ if let Some(tty::ChildEvent::Exited(code)) = self.pty.next_child_event()
+ {
+ if let Some(code) = code {
+ self.event_proxy.send_event(Event::ChildExit(code));
+ }
if self.hold {
// With hold enabled, make sure the PTY is drained.
let _ = self.pty_read(&mut state, &mut buf, pipe.as_mut());
@@ -267,7 +271,6 @@ where
// Without hold, shutdown the terminal.
self.terminal.lock().exit();
}
-
self.event_proxy.send_event(Event::Wakeup);
break 'event_loop;
}