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

Re: [PATCH v2] diff-highlight: exit when a pipe is broken

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2014, 20:52 UTC
Message-ID
<xmqqtx2epu1i.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20141104200932.GA15149@peff.net>
Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> On Tue, Nov 04, 2014 at 03:01:12PM -0500, John Szakmeister wrote:
>
>> While using diff-highlight with other tools, I have discovered that Python
>> ignores SIGPIPE by default.  Unfortunately, this also means that tools
>> attempting to launch a pager under Python--and don't realize this is
>> happening--means that the subprocess inherits this setting.  In this case, it
>> means diff-highlight will be launched with SIGPIPE being ignored.  Let's work
>> with those broken scripts by restoring the default SIGPIPE handler.
>> 
>> Signed-off-by: John Szakmeister <john@szakmeister.net>
>> ---
>> Incorporates feedback from Jeff King and now we just restore the default signal
>> handler using the correct case of 'DEFAULT'.
>
> Thanks, this version looks much simpler. :)
>
> Acked-by: Jeff King <peff@peff.net>
Thanks, both.  The patch looks good.  Will queue.
Previous: Jeff King
Message 3 of 3 in “diff-highlight: exit when a pipe is broken”
  1. diff-highlight: exit when a pipe is brokenJohn Szakmeister, Nov 4, 2014
  2. Jeff KingNov 4, 2014
  3. Junio C HamanoNov 4, 2014

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.