diff options
Diffstat (limited to 'bashline.c')
-rw-r--r-- | bashline.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -202,6 +202,7 @@ extern int current_command_line_count, saved_command_line_count; extern int last_command_exit_value; extern int array_needs_making; extern int posixly_correct, no_symbolic_links; +extern int sigalrm_seen; extern char *current_prompt_string, *ps1_prompt; extern STRING_INT_ALIST word_token_alist[]; extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; @@ -4208,8 +4209,9 @@ bash_event_hook () { /* If we're going to longjmp to top_level, make sure we clean up readline. check_signals will call QUIT, which will eventually longjmp to top_level, - calling run_interrupt_trap along the way. */ - if (interrupt_state) + calling run_interrupt_trap along the way. The check for sigalrm_seen is + to clean up the read builtin's state. */ + if (terminating_signal || interrupt_state || sigalrm_seen) rl_cleanup_after_signal (); bashline_reset_event_hook (); check_signals_and_traps (); /* XXX */ |