[dev] [st] [PATCH 2/3] Restore default signal behaviour

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 13 Sep 2012 23:08:56 +0200

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
_AT_@ -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
Received on Thu Sep 13 2012 - 23:08:56 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 23:12:06 CEST