X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ftooltalk.c;h=3f24b2eee48afb9cdf38ded52d77b6d8e6888fc7;hb=da416a1945940b3f952144475eb1a1357430527d;hp=36edcf5139bd71be6f6bae31e352bdea640f1292;hpb=0d13da69401238f67cf3b2ffddfc575446da1b59;p=chise%2Fxemacs-chise.git- diff --git a/src/tooltalk.c b/src/tooltalk.c index 36edcf5..3f24b2e 100644 --- a/src/tooltalk.c +++ b/src/tooltalk.c @@ -1256,7 +1256,28 @@ init_tooltalk (void) Lisp_Object lp; Lisp_Object fil; + + /* tt_open() messes with our signal handler flags (at least when no + ttsessions is running on the machine), therefore we save the + actions and restore them after the call */ +#ifdef HAVE_SIGPROCMASK + { + struct sigaction ActSIGQUIT; + struct sigaction ActSIGINT; + struct sigaction ActSIGCHLD; + sigaction (SIGQUIT, NULL, &ActSIGQUIT); + sigaction (SIGINT, NULL, &ActSIGINT); + sigaction (SIGCHLD, NULL, &ActSIGCHLD); +#endif retval = tt_open (); +#ifdef HAVE_SIGPROCMASK + sigaction (SIGQUIT, &ActSIGQUIT, NULL); + sigaction (SIGINT, &ActSIGINT, NULL); + sigaction (SIGCHLD, &ActSIGCHLD, NULL); + } +#endif + + if (tt_ptr_error (retval) != TT_OK) return;