From e336ac97e7fcee4e776bd41c3a3e3f0d5b27badf Mon Sep 17 00:00:00 2001 From: wk Date: Tue, 26 May 2009 09:29:33 +0000 Subject: [PATCH] signal cleanup fix git-svn-id: svn://cvs.gnupg.org/gnupg/trunk@5023 8a63c251-dffc-0310-8ec6-d64dca2275b1 --- common/ChangeLog | 4 ++++ common/ttyio.c | 8 ++++++++ common/ttyio.h | 1 + 3 files changed, 13 insertions(+) diff --git a/common/ChangeLog b/common/ChangeLog index 54ecd637..18167e42 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 84b81820..9882c8e3 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 3ece73bd..d19f7fdc 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); -- 2.11.4.GIT