Signal handlers are inherited from parent process, so we can not be sure
which it is the handler our shell process has. This can cause some problems
with some window managers (for example with some wmii versions).
---
 st.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/st.c b/st.c
index 26237de..868300c 100644
--- a/st.c
+++ b/st.c
@@ -772,6 +772,13 @@ execsh(void) {
        unsetenv("COLUMNS");
        unsetenv("LINES");
        unsetenv("TERMCAP");
+       signal(SIGCHLD, SIG_DFL);
+       signal(SIGHUP, SIG_DFL);
+       signal(SIGINT, SIG_DFL);
+       signal(SIGQUIT, SIG_DFL);
+       signal(SIGTERM, SIG_DFL);
+       signal(SIGALRM, SIG_DFL);
+

        DEFAULT(envshell, SHELL);
        putenv("TERM="TNAME);
--
1.7.10.4

Reply via email to