diff options
Diffstat (limited to 'shell.c')
-rw-r--r-- | shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -73,6 +73,7 @@ #endif #if defined (READLINE) +# include <readline/readline.h> # include "bashline.h" #endif @@ -909,6 +910,14 @@ exit_shell (s) fflush (stdout); /* XXX */ fflush (stderr); + /* Clean up the terminal if we are in a state where it's been modified. */ +#if defined (READLINE) + if (RL_ISSTATE (RL_STATE_TERMPREPPED) && rl_deprep_term_function) + (*rl_deprep_term_function) (); +#endif + if (read_tty_modified ()) + read_tty_cleanup (); + /* Do trap[0] if defined. Allow it to override the exit status passed to us. */ if (signal_is_trapped (0)) |