signal cleanup fix
authorWerner Koch <wk@gnupg.org>
Tue, 26 May 2009 09:29:33 +0000 (09:29 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 26 May 2009 09:29:33 +0000 (09:29 +0000)
common/ChangeLog
common/ttyio.c
common/ttyio.h

index 54ecd63..18167e4 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-22  Werner Koch  <wk@g10code.com>
+
+       * ttyio.c (tty_cleanup_after_signal): New.
+
 2009-05-19  Werner Koch  <wk@g10code.com>
 
        * simple-pwquery.c (agent_open): Use SUN_LEN
index 84b8182..9882c8e 100644 (file)
@@ -674,6 +674,14 @@ tty_disable_completion (void)
 
 
 void
+tty_cleanup_after_signal (void)
+{
+#ifdef HAVE_TCGETATTR
+  cleanup ();
+#endif
+}
+
+void
 tty_cleanup_rl_after_signal (void)
 {
   if (my_rl_cleanup_after_signal)
index 3ece73b..d19f7fd 100644 (file)
@@ -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);