git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 1/6] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2016, 16:43 UTC
Message-ID
<xmqqpou2y9fy.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1459872449-7537-2-git-send-email-santiago@nyu.edu>
santiago@nyu.edu writes:
> Subject: [PATCH v5 1/6] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface
s/Ignore/ignore/
Show 8 quoted lines
> From: Santiago Torres <santiago@nyu.edu>
>
> The verify_signed_buffer comand might cause a SIGPIPE signal when the
> gpg child process terminates early (due to a bad keyid, for example) and
> git tries to write to it afterwards. Previously, ignoring SIGPIPE was
> done on the builtin/verify-tag.c command to avoid this issue. However,
> any other caller who wanted to use the verify_signed_buffer command
> would have to include this signal call.
s/comand/command/ but more importantly, it is not a command ;-)
> Instead, we use sigchain_push(SIGPIPE, SIG_IGN) on the
> verify_signed_buffer call (pretty much like in sign_buffer()) so
> that any caller is not required to perform this task. This will avoid
> possible mistakes by further developers using verify_signed_buffer.
I'd rephrase like this if I were doing this patch:
    verify-tag: ignore SIGPIPE in verify_signed_buffer()
    The verify_signed_buffer() function may trigger a SIGPIPE when
    the GPG child process terminates early (due to a bad keyid, for
    example) and we try to write to it afterwards.  Ignoring SIGPIPE
    is done in builtin/verify-tag.c to avoid dying from it, but any
    other caller who wants to call verify_signed_buffer() would have
    to do the same.
    Use sigchain_push(SIGPIPE, SIG_IGN) in verify_signed_buffer(),
    pretty much like in sign_buffer(), so that any caller is not
    required to perform this task.
    This will avoid possible mistakes by further developers using
    verify_signed_buffer().

The patch text (as I already said in the response to the cover letter) looked fine.

Previous: santiago@nyu.eduNext: santiago@nyu.edu
Message 3 of 28 in “tag: move PGP verification code to tag.c”
  1. 0/6 tag: move PGP verification code to tag.csantiago@nyu.edu, Apr 5, 2016
  2. 1/6 builtin/verify-tag.c: Ignore SIGPIPE on gpg-interfacesantiago@nyu.edu, Apr 5, 2016
  3. Junio C HamanoApr 6, 2016
  4. 2/6 t7030-verify-tag: Adds validation for multiple tagssantiago@nyu.edu, Apr 5, 2016
  5. Eric SunshineApr 6, 2016
  6. Santiago TorresApr 17, 2016
  7. Eric SunshineApr 17, 2016
  8. Santiago TorresApr 17, 2016
  9. Eric SunshineApr 17, 2016
  10. Junio C HamanoApr 6, 2016
  11. 3/6 builtin/verify-tag: change variable name for readabilitysantiago@nyu.edu, Apr 5, 2016
  12. Junio C HamanoApr 6, 2016
  13. 4/6 builtin/verify-tag: replace name argument with sha1santiago@nyu.edu, Apr 5, 2016
  14. Eric SunshineApr 6, 2016
  15. Junio C HamanoApr 6, 2016
  16. Santiago TorresApr 7, 2016
  17. 5/6 builtin/verify-tag: move verification code to tag.csantiago@nyu.edu, Apr 5, 2016
  18. Junio C HamanoApr 6, 2016
  19. 6/6 tag: use gpg_verify_function in tag -v callsantiago@nyu.edu, Apr 5, 2016
  20. Eric SunshineApr 6, 2016
  21. Santiago TorresApr 5, 2016
  22. Eric SunshineApr 6, 2016
  23. Santiago TorresApr 7, 2016
  24. Eric SunshineApr 7, 2016
  25. Santiago TorresApr 17, 2016
  26. Eric SunshineApr 17, 2016
  27. Junio C HamanoApr 6, 2016
  28. Santiago TorresApr 7, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.