summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-02-27 17:26:03 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:05 +0100
commit18487b02b48a57c5d331bfb417feef451501cb51 (patch)
treeaf390a00d2b9162cbe7271c1d4e9fcbd95bad799 /signal.c
parentf5dde44eee092602bee6df746043abc6fcfec38f (diff)
next attempt to get readline interaction correct
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/signal.c b/signal.c
index a95c8fd..84e11c3 100644
--- a/signal.c
+++ b/signal.c
@@ -7,14 +7,14 @@
#include "sigmsgs.h"
#include "jbwrap.h"
-#if HAVE_RESTARTABLE_SYSCALLS
+#if HAVE_RESTARTABLE_SYSCALLS || READLINE
Jbwrap slowbuf;
-volatile SIG_ATOMIC_T slow, interrupt_happened;
+volatile sig_atomic_t slow, interrupt_happened;
#endif
void (*sighandlers[NUMOFSIGNALS])(int);
-static volatile SIG_ATOMIC_T sigcount, caught[NUMOFSIGNALS];
+static volatile sig_atomic_t sigcount, caught[NUMOFSIGNALS];
extern void catcher(int s) {
if (caught[s] == 0) {
@@ -28,7 +28,7 @@ extern void catcher(int s) {
in_readline = FALSE;
switch (s) {
default:
- rl_clean_up_for_exit();
+ _rl_clean_up_for_exit();
rl_deprep_terminal();
rl_clear_signals();
rl_pending_input = 0;
@@ -49,7 +49,7 @@ extern void catcher(int s) {
#endif /* READLINE */
-#if HAVE_RESTARTABLE_SYSCALLS
+#if HAVE_RESTARTABLE_SYSCALLS || READLINE
interrupt_happened = TRUE;
if (slow)
siglongjmp(slowbuf.j, 1);