diff options
author | Michael Jennings <mej@kainx.org> | 1999-09-08 17:57:06 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 1999-09-08 17:57:06 +0000 |
commit | 0efd3d7465edfa096afddf9f1068cf27864c03d5 (patch) | |
tree | 0a4183a45c1d619c363470417002518e67d1781f /src | |
parent | 48b2403b9ae5e59d0b68e2a159cad95a9dbd9a41 (diff) | |
download | eterm-0efd3d7465edfa096afddf9f1068cf27864c03d5.tar.gz |
Wed Sep 8 11:11:00 PDT 1999 Michael Jennings <mej@eterm.org>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr> for the theme files. Also
added a timeout for the backtrace attempt so that it hopefully won't
hang around forever when gdb decides to hang.
SVN revision: 204
Diffstat (limited to 'src')
-rw-r--r-- | src/command.c | 29 | ||||
-rw-r--r-- | src/term.c | 8 |
2 files changed, 21 insertions, 16 deletions
diff --git a/src/command.c b/src/command.c index 0e35e57..2372578 100644 --- a/src/command.c +++ b/src/command.c @@ -958,6 +958,21 @@ request_code_to_name(int code) return "Unknown"; } +static void +hard_exit(void) { + +#ifdef HAVE__EXIT + _exit(-1); +#elif defined(SIGKILL) + kill(cmd_pid, SIGKILL); + raise(SIGKILL); +#else + kill(cmd_pid, 9); + raise(9); +#endif + +} + /* Try to get a stack trace when we croak */ void dump_stack_trace(void) @@ -991,21 +1006,11 @@ dump_stack_trace(void) print_error("Your system does not support any of the methods Eterm uses. Exiting.\n"); return; #endif + signal(SIGALRM, (sighandler_t) hard_exit); + alarm(10); system(cmd); } -void -hard_exit(void) { - - dump_stack_trace(); -#ifdef HAVE__EXIT - _exit(-1); -#else - abort(); -#endif - -} - /* signal handling, exit handler */ /* * Catch a SIGCHLD signal and exit if the direct child has died @@ -149,6 +149,10 @@ lookup_key(XEvent * ev) } #endif /* USE_XIM */ +#ifdef USE_XIM + if (valid_keysym) { +#endif + if (action_dispatch(ev, keysym)) { return; } @@ -160,10 +164,6 @@ lookup_key(XEvent * ev) } } -#ifdef USE_XIM - if (valid_keysym) { -#endif - if ((Options & Opt_report_as_keysyms) && (keysym >= 0xff00)) { len = sprintf(kbuf, "\e[k%X;%X~", (unsigned int) (ev->xkey.state & 0xff), (unsigned int) (keysym & 0xff)); tt_write(kbuf, len); |