Hello,

Thank you for your report.

paolobrignoli25 wrote:
> Is this an intended, or at least known behavior?

I don't think it is intended.

I think that pinentry-tty is not recommended to use (use loopback
pinentry mode, instead).

I will commit the change attached if no one complains.
-- 
diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index 0feb27c..48b53ff 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -322,7 +322,10 @@ confirm (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
 
 #ifndef HAVE_DOSISH_SYSTEM
   if (timed_out)
-    pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+    {
+      pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+      tcflush (fileno (ttyfi), TCIFLUSH);
+    }
 #endif
 
   return ret;
@@ -478,7 +481,10 @@ password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
 
 #ifndef HAVE_DOSISH_SYSTEM
   if (timed_out)
-    pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+    {
+      pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+      tcflush (fileno (ttyfi), TCIFLUSH);
+    }
 #endif
 
   return done;
_______________________________________________
Gnupg-users mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to