Index: g10/signal.c =================================================================== --- g10/signal.c +++ g10/signal.c @@ -88,6 +88,7 @@ rl_free_line_state (); rl_cleanup_after_signal (); #endif + tty_cleanup_after_signal (); /* Better don't translate these messages. */ write(2, "\n", 1 ); Index: include/ttyio.h =================================================================== --- include/ttyio.h +++ include/ttyio.h @@ -53,5 +53,6 @@ #define tty_enable_completion(x) #define tty_disable_completion() #endif +void tty_cleanup_after_signal (void); #endif /*G10_TTYIO_H*/ Index: util/ttyio.c =================================================================== --- util/ttyio.c +++ util/ttyio.c @@ -122,6 +122,14 @@ } #endif +void +tty_cleanup_after_signal (void) +{ +#ifdef HAVE_TCGETATTR + cleanup (); +#endif +} + static void init_ttyfp(void) {