diff --git a/common/ChangeLog b/common/ChangeLog index 54ecd637f..18167e426 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,7 @@ +2009-05-22 Werner Koch + + * ttyio.c (tty_cleanup_after_signal): New. + 2009-05-19 Werner Koch * simple-pwquery.c (agent_open): Use SUN_LEN diff --git a/common/ttyio.c b/common/ttyio.c index 84b81820c..9882c8e30 100644 --- a/common/ttyio.c +++ b/common/ttyio.c @@ -673,6 +673,14 @@ tty_disable_completion (void) } +void +tty_cleanup_after_signal (void) +{ +#ifdef HAVE_TCGETATTR + cleanup (); +#endif +} + void tty_cleanup_rl_after_signal (void) { diff --git a/common/ttyio.h b/common/ttyio.h index 3ece73bd5..d19f7fdca 100644 --- a/common/ttyio.h +++ b/common/ttyio.h @@ -47,6 +47,7 @@ int tty_no_terminal (int onoff); void tty_enable_completion (rl_completion_func_t *completer); void tty_disable_completion (void); +void tty_cleanup_after_signal (void); void tty_cleanup_rl_after_signal (void);