aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-05-22 15:38:49 +0000
committerWerner Koch <[email protected]>2009-05-22 15:38:49 +0000
commit0bbe6eda34542656ce896fe7b1c437974009fc3b (patch)
tree836421453c11dca36e6357901a47c07d46caf8b1
parentFix bug#1044. (diff)
downloadgnupg-0bbe6eda34542656ce896fe7b1c437974009fc3b.tar.gz
gnupg-0bbe6eda34542656ce896fe7b1c437974009fc3b.zip
Fixed bug1058.
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/signal.c1
-rw-r--r--include/ttyio.h1
-rw-r--r--util/ChangeLog4
-rw-r--r--util/ttyio.c8
5 files changed, 18 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 655734bfa..307428e1f 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-22 Werner Koch <[email protected]>
+
+ * signal.c (got_fatal_signal): Call tty_cleanup_after_signal.
+
2009-05-20 Werner Koch <[email protected]>
* gpg.c (main): Fix --fingerprint/--with-fingerprint command
diff --git a/g10/signal.c b/g10/signal.c
index 08c790c1a..cd24dc0c8 100644
--- a/g10/signal.c
+++ b/g10/signal.c
@@ -88,6 +88,7 @@ got_fatal_signal( int sig )
rl_free_line_state ();
rl_cleanup_after_signal ();
#endif
+ tty_cleanup_after_signal ();
/* Better don't translate these messages. */
write(2, "\n", 1 );
diff --git a/include/ttyio.h b/include/ttyio.h
index ed064ecde..b4fa03da5 100644
--- a/include/ttyio.h
+++ b/include/ttyio.h
@@ -53,5 +53,6 @@ void tty_disable_completion(void);
#define tty_enable_completion(x)
#define tty_disable_completion()
#endif
+void tty_cleanup_after_signal (void);
#endif /*G10_TTYIO_H*/
diff --git a/util/ChangeLog b/util/ChangeLog
index 85d5a49fc..d060fe299 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-22 Werner Koch <[email protected]>
+
+ * ttyio.c (tty_cleanup_after_signal): New.
+
2009-05-05 Werner Koch <[email protected]>
* dotlock.c: Merged changes from GnuPG-2. Better detection of
diff --git a/util/ttyio.c b/util/ttyio.c
index b60a9196a..2a0c91be2 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -122,6 +122,14 @@ cleanup(void)
}
#endif
+void
+tty_cleanup_after_signal (void)
+{
+#ifdef HAVE_TCGETATTR
+ cleanup ();
+#endif
+}
+
static void
init_ttyfp(void)
{