aboutsummaryrefslogtreecommitdiffstats
path: root/ui/backend
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2024-07-22 16:31:12 +0100
committerGitHub <noreply@github.com>2024-07-22 16:31:12 +0100
commit95cef714902bbcbdc3ef016457e7a77d38293ea8 (patch)
tree9d51eca20a381dedbb44ab16622fc08dffc269fb /ui/backend
parentchore(deps): bump highlight.js from 11.9.0 to 11.10.0 in /ui (#2298) (diff)
downloadatuin-95cef714902bbcbdc3ef016457e7a77d38293ea8.zip
feat(gui): background terminals and more (#2303)
* fixes & allow for background terminals to stay running * status indicators etc
Diffstat (limited to 'ui/backend')
-rw-r--r--ui/backend/src/run/pty.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/backend/src/run/pty.rs b/ui/backend/src/run/pty.rs
index 819dc7d0..2af617dd 100644
--- a/ui/backend/src/run/pty.rs
+++ b/ui/backend/src/run/pty.rs
@@ -86,9 +86,17 @@ pub(crate) async fn pty_kill(
pid: uuid::Uuid,
state: tauri::State<'_, AtuinState>,
) -> Result<(), String> {
- let pty = state.pty_sessions.write().await.remove(&pid).unwrap();
- pty.kill_child().await.map_err(|e|e.to_string())?;
- println!("RIP {pid:?}");
+ let pty = state.pty_sessions.write().await.remove(&pid);
+
+ match pty {
+ Some(pty)=>{
+
+ pty.kill_child().await.map_err(|e|e.to_string())?;
+ println!("RIP {pid:?}");
+ }
+ None=>{}
+ }
+
Ok(())
}