aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorraphCode <15750438+raphCode@users.noreply.github.com>2022-04-15 19:47:46 +0200
committerGitHub <noreply@github.com>2022-04-15 19:47:46 +0200
commitd4b8199d025cd6c470067fd4b2dfa203ecb5e012 (patch)
tree59a0fee0bc5dd41121559afa79e4553e7ad31869
parentdocs(changelog): ansi scrolling regression fix (diff)
downloadsl0ppij-d4b8199d025cd6c470067fd4b2dfa203ecb5e012.tar.gz
sl0ppij-d4b8199d025cd6c470067fd4b2dfa203ecb5e012.tar.xz
sl0ppij-d4b8199d025cd6c470067fd4b2dfa203ecb5e012.zip
fix(pty): send SIGHUP instead of SIGTERM when closing a pane (#1320)
SIGHUP correctly states the intention behind sending a signal when a pane is closed: The controlling terminal is "hung up". Also, SIGHUP is better suited than SIGTERM since bash ignores the latter. This led to the zombie processes observed by some users. Furthermore, SIGHUP has a special meaning in bash's job control, namely re-sending the signal to all owned jobs before exiting.
-rw-r--r--zellij-server/src/os_input_output.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/zellij-server/src/os_input_output.rs b/zellij-server/src/os_input_output.rs
index f0b49c68..7905a6e3 100644
--- a/zellij-server/src/os_input_output.rs
+++ b/zellij-server/src/os_input_output.rs
@@ -300,7 +300,7 @@ impl ServerOsApi for ServerOsInputOutput {
Box::new((*self).clone())
}
fn kill(&self, pid: Pid) -> Result<(), nix::Error> {
- let _ = kill(pid, Some(Signal::SIGTERM));
+ let _ = kill(pid, Some(Signal::SIGHUP));
Ok(())
}
fn force_kill(&self, pid: Pid) -> Result<(), nix::Error> {