X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ftooltalk.c;h=3f24b2eee48afb9cdf38ded52d77b6d8e6888fc7;hb=667a2b3a2dbea07c3c228e17d986110cc6a33084;hp=a7e0ed9f54f7ef45949667ea02ae4f0f234dd825;hpb=976b002b16336930724ae22476014583ad022e7d;p=chise%2Fxemacs-chise.git diff --git a/src/tooltalk.c b/src/tooltalk.c index a7e0ed9..3f24b2e 100644 --- a/src/tooltalk.c +++ b/src/tooltalk.c @@ -175,7 +175,7 @@ print_tooltalk_message (Lisp_Object obj, Lisp_Object printcharfun, DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message, mark_tooltalk_message, print_tooltalk_message, - 0, 0, 0, + 0, 0, 0, 0, struct Lisp_Tooltalk_Message); static Lisp_Object @@ -249,7 +249,7 @@ print_tooltalk_pattern (Lisp_Object obj, Lisp_Object printcharfun, DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern, mark_tooltalk_pattern, print_tooltalk_pattern, - 0, 0, 0, + 0, 0, 0, 0, struct Lisp_Tooltalk_Pattern); static Lisp_Object @@ -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;