El día Saturday, December 26, 2015 a las 08:34:58AM -0800, Kevin J. McCarthy escribió:
> Mutt uses cbreak mode, but doesn't toggle raw/cooked mode anywhere as
> far as I can tell. In this case, the "Invoking PGP..." message is
> output before starting to display an encrypted message. It's
> generated by a mvaddstr() and refresh().
>
> For gpgme, mutt is just making gpgme function calls,
> e.g. gpgme_op_decrypt_verify(), and then setting a flag to do a redraw
> afterwards. I don't see the code doing anything much different
> between decrypt/verify and signing.
>
> Werner, can you see anything different between
> gpgme_op_decrypt_verify() and gpgme_op_sign() and how they invoke
> pinentry if needed?
The improved version of my intermidiate script is:
#!/bin/sh
save_state=$(stty -g < $GPG_TTY)
stty cooked < $GPG_TTY
/usr/local/bin/pinentry $*
stty "$save_state" < $GPG_TTY
i.e. does saving and restoring of the stty state. The problem with this
is, that the env var $GPG_TTY is stored in the proc context of the
gpg-agent daemon and if you run mutt from another xterm this does not
match the actual tty :-(
matthias
--
Matthias Apitz, ✉ [email protected], 🌐 http://www.unixarea.de/ ☎
+49-176-38902045
pgpXhlGShmeZP.pgp
Description: PGP signature
