Page MenuHome GnuPG

Broken Pipe
Closed, ResolvedPublic

Description

gpg pipe to stdout breaks when there is a delay in piping output such as occurs
when you have to type in a keycode or password before proceeding so piping to a
command that has a sudo breaks it. In my case I was running:

gpg --output - --export-secret-key XXXXXXXX | cat pubkey.gpg | gpg --armor
--output keys.asc --symmetric --cipher-algo AES256

And got the output:

gpg: [stdout]: write error: Broken pipe
gpg: iobuf_flush failed on close: file write error
gpg: problem with the agent - disabling agent use

Actually (just testing) I found that this problem happened with the 'cat'
command in place and not without. Maybe it is something wrong with my syntax.

I'm reporting it anyway in case its a gnupg bug.

Details

Version
1.4.11-3ubuntu1

Event Timeline

mikey set Version to 1.4.11-3ubuntu1.
mikey added a subscriber: mikey.
werner added a subscriber: werner.

cat(1) is not expecting any input thus you see the broke pipe from the first gpg(1).

werner claimed this task.