commit bddc8b04d690887ea6f8da6ff9aee7f9785e7e84
parent 22385ca4a83bebfd7b15388bf913e384765a40b1
Author: Sidhanth Rathod <siduck@tutanota.com>
Date: Sat, 30 Mar 2024 21:00:14 +0530
Merge pull request #64 from rdbo/window-close-fix
Fixes window not closing (#63)
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/st.c b/st.c
@@ -965,8 +965,14 @@ ttyresize(int tw, int th)
void
ttyhangup()
{
+ /* disable signal handler (fixes window not closing) */
+ signal(SIGCHLD, SIG_IGN);
+
/* Send SIGHUP to shell */
kill(pid, SIGHUP);
+
+ /* forcefully die */
+ die("tty was hung up\n");
}
int