diff options
| author | tgoodwin <tgoodwin> | 1998-02-23 15:45:05 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:05 +0100 |
| commit | ac8a8fcf0dad4e73b16a584d4ba3c02b89c1b86e (patch) | |
| tree | 56bf5bd2a1a0f52a66a588b33f0127e1fce0b646 /signal.c | |
| parent | ed765fba692da152247018becb1f407a4ee64452 (diff) | |
incorporate Tom Culliton's patches for readline
Diffstat (limited to 'signal.c')
| -rw-r--r-- | signal.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -23,6 +23,32 @@ extern void catcher(int s) { } signal(s, catcher); +#if READLINE + if (in_readline) { + in_readline = FALSE; + switch (s) { + default: + rl_clean_up_for_exit(); + rl_deprep_terminal(); + rl_clear_signals(); + rl_pending_input = 0; + break; + +/* These signals are already cleaned up by readline. */ + + case SIGINT: + case SIGALRM: +#ifdef SIGTSTP + case SIGTSTP: + case SIGTTOU: + case SIGTTIN: +#endif + break; + } + } +#endif /* READLINE */ + + #if HAVE_RESTARTABLE_SYSCALLS interrupt_happened = TRUE; if (slow) |