summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-05-26 11:29:33 +0200
committerWerner Koch <wk@gnupg.org>2009-05-26 11:29:33 +0200
commitc4282847885627a2ebd8cca5e4717eb39eb83bf0 (patch)
tree2d2f82e651e97e4cb8e5295d76716bb30b453837 /common
parentFix a signal cleanup problem. (diff)
downloadgnupg2-c4282847885627a2ebd8cca5e4717eb39eb83bf0.tar.xz
gnupg2-c4282847885627a2ebd8cca5e4717eb39eb83bf0.zip
signal cleanup fix
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog4
-rw-r--r--common/ttyio.c8
-rw-r--r--common/ttyio.h1
3 files changed, 13 insertions, 0 deletions
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 <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
diff --git a/common/ttyio.c b/common/ttyio.c
index 84b81820c..9882c8e30 100644
--- a/common/ttyio.c
+++ b/common/ttyio.c
@@ -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)
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);