changeset 74610:0da2b2f82afc

(handle_user_signal): Move function to keyboard.c. (main): Use add_user_signal for SIGUSR1 and SIGUSR2.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Thu, 14 Dec 2006 08:41:23 +0000
parents 9a6adce29f04
children 4d547fe4a938
files src/emacs.c
diffstat 1 files changed, 2 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Thu Dec 14 01:24:41 2006 +0000
+++ b/src/emacs.c	Thu Dec 14 08:41:23 2006 +0000
@@ -361,24 +361,6 @@
 #endif
 
 
-#if defined (SIGUSR1) || defined (SIGUSR2)
-SIGTYPE
-handle_user_signal (sig)
-     int sig;
-{
-  struct input_event buf;
-
-  SIGNAL_THREAD_CHECK (sig);
-  bzero (&buf, sizeof buf);
-  buf.kind = USER_SIGNAL_EVENT;
-  buf.frame_or_window = selected_frame;
-
-  kbd_buffer_store_event (&buf);
-  buf.code = sig;
-  kbd_buffer_store_event (&buf);
-}
-#endif
-
 /* Handle bus errors, invalid instruction, etc.  */
 SIGTYPE
 fatal_error_signal (sig)
@@ -1211,10 +1193,10 @@
       signal (SIGILL, fatal_error_signal);
       signal (SIGTRAP, fatal_error_signal);
 #ifdef SIGUSR1
-      signal (SIGUSR1, handle_user_signal);
+      add_user_signal (SIGUSR1, "usr1");
 #endif
 #ifdef SIGUSR2
-      signal (SIGUSR2, handle_user_signal);
+      add_user_signal (SIGUSR2, "usr2");
 #endif
 #ifdef SIGABRT
       signal (SIGABRT, fatal_error_signal);