summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>1999-09-08 17:57:06 +0000
committerMichael Jennings <mej@kainx.org>1999-09-08 17:57:06 +0000
commit0efd3d7465edfa096afddf9f1068cf27864c03d5 (patch)
tree0a4183a45c1d619c363470417002518e67d1781f /src
parent48b2403b9ae5e59d0b68e2a159cad95a9dbd9a41 (diff)
downloadeterm-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.c29
-rw-r--r--src/term.c8
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
diff --git a/src/term.c b/src/term.c
index 4928c39..be33d81 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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);