summaryrefslogtreecommitdiff
path: root/xinit.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-10-04 01:27:34 +0000
committerAdam Jackson <ajax@nwnk.net>2005-10-04 01:27:34 +0000
commite2dd25d3cf2f10c0cff0d37d05f58b81344db68b (patch)
tree546d12cda07e8e7a4abc7e66d032a2e280d93b5a /xinit.c
parent48ea043e65943fd66e03788be9867c69b96c738c (diff)
Bug #2027: Treat SIGTERM like SIGINT in xinit. (Andreas Luik)XORG-6_8_99_901
Diffstat (limited to 'xinit.c')
-rw-r--r--xinit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xinit.c b/xinit.c
index 5ced5cd..956d78a 100644
--- a/xinit.c
+++ b/xinit.c
@@ -215,6 +215,7 @@ sigCatch(int sig)
#ifdef X_NOT_POSIX
char buf[1024];
+ signal(SIGTERM, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
signal(SIGHUP, SIG_IGN);
@@ -440,6 +441,7 @@ main(int argc, char *argv[], char *envp[])
signal(SIGCHLD, SIG_DFL); /* Insurance */
#endif
#ifdef X_NOT_POSIX
+ signal(SIGTERM, sigCatch);
signal(SIGQUIT, sigCatch);
signal(SIGINT, sigCatch);
signal(SIGHUP, sigCatch);
@@ -451,6 +453,7 @@ main(int argc, char *argv[], char *envp[])
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0; /* do not set SA_RESTART */
+ sigaction(SIGTERM, &sa, NULL);
sigaction(SIGQUIT, &sa, NULL);
sigaction(SIGINT, &sa, NULL);
sigaction(SIGHUP, &sa, NULL);
@@ -468,6 +471,7 @@ main(int argc, char *argv[], char *envp[])
)
pid = wait(NULL);
}
+ signal(SIGTERM, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
signal(SIGHUP, SIG_IGN);