summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-12-14 08:41:23 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-12-14 08:41:23 +0000
commit511268f5502a375895b5428966e45c125428fd8e (patch)
treeae6bb2bef88f2162b527a614529b661ab6e61e84 /src/emacs.c
parentbcd3e063d116e9b7e3e7b082fb1e2d1e6169fdcb (diff)
downloademacs-511268f5502a375895b5428966e45c125428fd8e.tar.gz
(handle_user_signal): Move function to keyboard.c.
(main): Use add_user_signal for SIGUSR1 and SIGUSR2.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 7a5be030d93..ded746fa16e 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -361,24 +361,6 @@ pthread_t main_thread;
#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 @@ main (argc, argv
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);