diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/xterm.c b/src/xterm.c index 047b5569bf4..f0f6702cd67 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | /* Xt features made by Fred Pierresteguy. */ | 21 | /* Xt features made by Fred Pierresteguy. */ |
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <signal.h> | ||
| 25 | #include <stdio.h> | 24 | #include <stdio.h> |
| 26 | #include <setjmp.h> | 25 | #include <setjmp.h> |
| 27 | 26 | ||
| @@ -29,9 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | 28 | ||
| 30 | #include "lisp.h" | 29 | #include "lisp.h" |
| 31 | #include "blockinput.h" | 30 | #include "blockinput.h" |
| 32 | |||
| 33 | /* Need syssignal.h for various externs and definitions that may be required | ||
| 34 | by some configurations for calls to signal later in this source file. */ | ||
| 35 | #include "syssignal.h" | 31 | #include "syssignal.h" |
| 36 | 32 | ||
| 37 | /* This may include sys/types.h, and that somehow loses | 33 | /* This may include sys/types.h, and that somehow loses |
| @@ -7766,7 +7762,9 @@ x_connection_signal (int signalnum) /* If we don't have an argument, */ | |||
| 7766 | #ifdef USG | 7762 | #ifdef USG |
| 7767 | /* USG systems forget handlers when they are used; | 7763 | /* USG systems forget handlers when they are used; |
| 7768 | must reestablish each time */ | 7764 | must reestablish each time */ |
| 7769 | signal (signalnum, x_connection_signal); | 7765 | struct sigaction action; |
| 7766 | emacs_sigaction_init (&action, x_connection_signal); | ||
| 7767 | sigaction (signalnum, &action, 0); | ||
| 7770 | #endif /* USG */ | 7768 | #endif /* USG */ |
| 7771 | } | 7769 | } |
| 7772 | 7770 | ||
| @@ -7876,10 +7874,15 @@ For details, see etc/PROBLEMS.\n", | |||
| 7876 | } | 7874 | } |
| 7877 | 7875 | ||
| 7878 | /* Ordinary stack unwind doesn't deal with these. */ | 7876 | /* Ordinary stack unwind doesn't deal with these. */ |
| 7877 | { | ||
| 7878 | sigset_t unblocked; | ||
| 7879 | sigemptyset (&unblocked); | ||
| 7879 | #ifdef SIGIO | 7880 | #ifdef SIGIO |
| 7880 | sigunblock (sigmask (SIGIO)); | 7881 | sigaddset (&unblocked, SIGIO); |
| 7881 | #endif | 7882 | #endif |
| 7882 | sigunblock (sigmask (SIGALRM)); | 7883 | sigaddset (&unblocked, SIGALRM); |
| 7884 | pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); | ||
| 7885 | } | ||
| 7883 | TOTALLY_UNBLOCK_INPUT; | 7886 | TOTALLY_UNBLOCK_INPUT; |
| 7884 | 7887 | ||
| 7885 | unbind_to (idx, Qnil); | 7888 | unbind_to (idx, Qnil); |
| @@ -10759,6 +10762,8 @@ x_create_terminal (struct x_display_info *dpyinfo) | |||
| 10759 | void | 10762 | void |
| 10760 | x_initialize (void) | 10763 | x_initialize (void) |
| 10761 | { | 10764 | { |
| 10765 | struct sigaction action; | ||
| 10766 | |||
| 10762 | baud_rate = 19200; | 10767 | baud_rate = 19200; |
| 10763 | 10768 | ||
| 10764 | x_noop_count = 0; | 10769 | x_noop_count = 0; |
| @@ -10805,7 +10810,8 @@ x_initialize (void) | |||
| 10805 | XSetErrorHandler (x_error_handler); | 10810 | XSetErrorHandler (x_error_handler); |
| 10806 | XSetIOErrorHandler (x_io_error_quitter); | 10811 | XSetIOErrorHandler (x_io_error_quitter); |
| 10807 | 10812 | ||
| 10808 | signal (SIGPIPE, x_connection_signal); | 10813 | emacs_sigaction_init (&action, x_connection_signal); |
| 10814 | sigaction (SIGPIPE, &action, 0); | ||
| 10809 | } | 10815 | } |
| 10810 | 10816 | ||
| 10811 | 10817 | ||