gpgme+gpgsm bug: fails when stdout redirected

Albrecht Dreß albrecht.dress at
Wed Jan 28 20:51:32 CET 2004

Am 27.01.04 22:58 schrieb(en) Marcus Brinkmann:
> We do not have the code in there to only prepare for this situation when
> it
> can occur, or at least fail gracefully if we end up in a situation where
> we
> can't do the right thing.  That's sort of an unexplored corner of the
> whole
> setup.  We might need to pass the information that no tty is available
> down
> to gpgsm->gpg-agent->pinentry, but expect some operations to fail then
> because the passphrase can't be received (unless you setup everything to
> ensure that pinentry pops up on some other tty/X or gpg-agent has the
> passphrase cached, etc).

O.k., I see the problem... but this means that this process will *always*  
fail when I simply redirect my output somewhere, which is obviously a bad  
situation. IMHO, it should be possible to at least catch the missing tty  
if the DISPLAY environment variable is set, in which case all downstream  
agents had to use X11, in the worst case by running an xterm (should  
always be present in X11 installations). The same applies if the tty is  
present, but not X11, so everybody had to use ncurses (or whatever). The  
only situation when those processes are *really* lost if neither X11 nor  
the control terminal is available - no idea how likely this is.

I discovered this bug when testing the first steps of s/mime support for  
the gnome mua balsa. When running balsa form a terminal, it works fine,  
but when launching it from the gnome menu or panel, it fails, apparently
because they redirect stdout/stderr for diagnostic purposes. Needless to
say that this bug is a real blocker, and explaining a hundred times in the  
mailing lists that people have to open a terminal and launch balsa  
manually if they want to have s/mime support is a nightmare!

Cheers, Albrecht.

 Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
       Phone (+49) 228 6199571  -  mailto:albrecht.dress at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20040128/1fdb0671/attachment.bin

More information about the Gnupg-devel mailing list