diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-10-04 01:27:34 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-10-04 01:27:34 +0000 |
commit | e2dd25d3cf2f10c0cff0d37d05f58b81344db68b (patch) | |
tree | 546d12cda07e8e7a4abc7e66d032a2e280d93b5a | |
parent | 48ea043e65943fd66e03788be9867c69b96c738c (diff) |
Bug #2027: Treat SIGTERM like SIGINT in xinit. (Andreas Luik)XORG-6_8_99_901
-rw-r--r-- | xinit.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |