From: "Carlos Rica" <jasampler@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] Make verify-tag a builtin.
Date: Sat, 28 Jul 2007 20:02:09 +0200 [thread overview]
Message-ID: <1b46aba20707281102j6d519125y176fd11e3ab53fab@mail.gmail.com> (raw)
In-Reply-To: <7vtzrpwo44.fsf@assigned-by-dhcp.cox.net>
Your explanation about the I/O in parallel sounds much better to me,
now I understand, thank you Junio.
2007/7/27, Junio C Hamano <gitster@pobox.com>:
> What is happening is:
>
> 1. Your process prepares the whole thing in vtag-tmp, to hand
> to gpg;
>
> 2. You make a pipe and start gpg with the above file telling it
> "here is a detached signature file, the payload will be fed
> through your stdin";
>
> 3-a. You feed the payload to the pipe, expecting gpg to read it.
>
> 3-b. gpg reads the detached signature file, finds no signature in
> the vtag-tmp file because the tag in question is not signed,
> and exits without reading a single byte from the pipe;
>
> Now, 3-a and 3-b run in parallel. If 3-a is scheduled before
> 3-b happens, because payload is very often much smaller than the
> in-kernel pipe buffer, your write(2) succeeds before gpg gives up
> and exits without reading from the pipe. If 3-b is scheduled
> before 3-a, then gpg exits and when 3-a gets around to write(2)
> to the pipe, write notices that there is nobody on the other end
> of the pipe, and you get SIGPIPE.
next prev parent reply other threads:[~2007-07-28 18:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 4:07 [PATCH] Make verify-tag a builtin Carlos Rica
2007-07-27 7:05 ` Junio C Hamano
2007-07-27 19:51 ` Carlos Rica
2007-07-27 21:08 ` Junio C Hamano
2007-07-28 18:02 ` Carlos Rica [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-23 0:20 Carlos Rica
2007-07-23 0:52 ` Johannes Schindelin
2007-07-23 21:21 ` Carlos Rica
2007-07-23 21:48 ` Johannes Schindelin
2007-07-23 22:31 ` Carlos Rica
2007-07-23 22:32 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b46aba20707281102j6d519125y176fd11e3ab53fab@mail.gmail.com \
--to=jasampler@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).