Re: [PATCHv3] gpg-interface: check gpg signature creation status
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2016, 18:13 UTC
- Message-ID
- <xmqq60tbaba5.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <8e08b63b58302b6e7fe91f0dfb5b476781bfd37d.1465915311.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> bottom = signature->len; > - len = strbuf_read(signature, gpg.out, 1024); > + strbuf_read(signature, gpg.out, 1024); > + strbuf_read(&err, gpg.err, 0);
Hmmmm, isn't this asking for a deadlock? When GPG spews more than what would fit in a pipe buffer to its standard error (hence gets blocked), its standard output may not complete, and the we would get stuck by attempting to read from gpg.out, failing to reach the other strbuf_read() that would unblock GPG by reading from gpg.err?