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

Re: [PATCH v2] receive-pack: ignore SIGPIPE while reporting status to client

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2021, 23:03 UTC
Message-ID
<xmqq5yt10w5r.fsf@gitster.g>
In-Reply-To
<CFLKOIVJ8EX0.2PWQ6PCXZ340A@diabtop>
"Robin Jarry" <robin@jarry.cc> writes:
Show 13 quoted lines
>> > +		sigchain_push(SIGPIPE, SIG_IGN);
>> >  		if (pack_lockfile)
>> >  			unlink_or_warn(pack_lockfile);
>>
>> Shouldn't we start ignoring SIGPIPE here, not before we try to
>> unlink the lockfile?
>
> I initially wanted to avoid getting SIGPIPE'd while printing a warning
> if the lockfile cannot be unlinked. Maybe this means the repository
> integrity is compromised and we are well beyond ensuring post-receive is
> executed or not. I do not know git internals well enough to be sure.
>
> What do you think?

I think that push/pop pair should surround the part that reports the status, as the proposed commit log message said.

Thanks.
Previous: Robin JarryNext: Robin Jarry
Message 7 of 11 in “receive-pack: run post-receive before reporting status”
  1. receive-pack: run post-receive before reporting statusRobin Jarry, Nov 4, 2021
  2. Ævar Arnfjörð BjarmasonNov 6, 2021
  3. Robin JarryNov 6, 2021
  4. receive-pack: ignore SIGPIPE while reporting status to clientRobin Jarry, Nov 6, 2021
  5. Junio C HamanoNov 9, 2021
  6. Robin JarryNov 9, 2021
  7. Junio C HamanoNov 9, 2021
  8. receive-pack: interrupt pre-receive when client disconnectsRobin Jarry, Nov 10, 2021
  9. Robin JarryDec 29, 2021
  10. receive-pack: ignore SIGPIPE while reporting status to clientRobin Jarry, Nov 10, 2021
  11. Robin JarryNov 18, 2021

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.