comparison src/tooltalk.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 182f72e8cd0d
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
31 31
32 #include "buffer.h" 32 #include "buffer.h"
33 #include "elhash.h" 33 #include "elhash.h"
34 #include "process.h" 34 #include "process.h"
35 #include "tooltalk.h" 35 #include "tooltalk.h"
36
37 #include "syssignal.h"
38 36
39 Lisp_Object Vtooltalk_fd; 37 Lisp_Object Vtooltalk_fd;
40 38
41 #ifdef TT_DEBUG 39 #ifdef TT_DEBUG
42 static FILE *tooltalk_log_file; 40 static FILE *tooltalk_log_file;
1256 /* This function can GC */ 1254 /* This function can GC */
1257 char *retval; 1255 char *retval;
1258 Lisp_Object lp; 1256 Lisp_Object lp;
1259 Lisp_Object fil; 1257 Lisp_Object fil;
1260 1258
1261
1262 /* tt_open() messes with our signal handler flags (at least when no
1263 ttsessions is running on the machine), therefore we save the
1264 actions and restore them after the call */
1265 #ifdef HAVE_SIGPROCMASK
1266 {
1267 struct sigaction ActSIGQUIT;
1268 struct sigaction ActSIGINT;
1269 struct sigaction ActSIGCHLD;
1270 sigaction (SIGQUIT, NULL, &ActSIGQUIT);
1271 sigaction (SIGINT, NULL, &ActSIGINT);
1272 sigaction (SIGCHLD, NULL, &ActSIGCHLD);
1273 #endif
1274 retval = tt_open (); 1259 retval = tt_open ();
1275 #ifdef HAVE_SIGPROCMASK
1276 sigaction (SIGQUIT, &ActSIGQUIT, NULL);
1277 sigaction (SIGINT, &ActSIGINT, NULL);
1278 sigaction (SIGCHLD, &ActSIGCHLD, NULL);
1279 }
1280 #endif
1281
1282
1283 if (tt_ptr_error (retval) != TT_OK) 1260 if (tt_ptr_error (retval) != TT_OK)
1284 return; 1261 return;
1285 1262
1286 Vtooltalk_fd = make_int (tt_fd ()); 1263 Vtooltalk_fd = make_int (tt_fd ());
1287 1264