[pkg-gnupg-maint] Bug#787781: Bug#787781: gnupg-agent: broken pipe error when a program using agent is invoked by stdbuf -oL

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jun 5 00:29:11 UTC 2015


Control: affects 787781 + pass
Control: tags + help moreinfo

On Thu 2015-06-04 19:04:53 -0400, nfb wrote:
> i have a script that uses pass [0] password manager, which on his hand
> uses gpg-agent to remember the master passphrase, as you can see.
> Also i have to filter its output, so i pipe it into another script,
> but since i want the output to be unbuffered to get a more real-time
> feedback, i tried calling it this way:
>
> stdbuf -oL pass <pass_arguments>
>
> which buffers on a per line basis. On my x86 pc everything is fine,
> while on my arm device i get:
>
> gpg: error writing to `-': Broken pipe
> gpg: handle plaintext failed: Broken pipe
>
> but after that the script works as expected.

Is that the only difference between your arm device and your x86 device?

>From the footer in your bug report, you're using pinentry-curses on the
arm device.  is this true for x86 as well, or are you using a different
pinentry there?

on each machine, what do these show?

  readlink -f /etc/alternatives/pinentry
  grep pinentry ~/.gnupg/*.conf

> So i was wondering if any tool using gpg-agent invoked with stdbuf
> with '-oL' option gives this error. I tried using '-o0' instead of
> '-oL' as stdbuf option, and this gives no problems. I also tried
> doing some symmetric encryptions/decriptions (not involving gpg-agent)
> to make sure the issue was on the agent side, invoking every time gpg
> with stdbuf, and indeed no error is showed when the agent is not used.

I think the issue might be related to the choice of pinentry on the
different platforms, but i'm not sure.  Maybe the pass developers can
shed some light on the subject?

     --dkg



More information about the pkg-gnupg-maint mailing list