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

Re: [PATCH] t7006: clean up SIGPIPE handling in trace2 tests

From
Jeff King <peff@peff.net>
Date
Nov 22, 2021, 19:11 UTC
Message-ID
<YZvrVj8w8j2Fb14O@coredump.intra.peff.net>
In-Reply-To
<xmqq5yskn3ir.fsf@gitster.g>
On Sun, Nov 21, 2021 at 09:49:32PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> > That's a lot more tedious "if (!in_signal)" checks, but:
> >
> >   - we don't have to duplicate any of the actual application logic
> >
> >   - we'd now cover the extra cases for waitpid failing or returning the
> >     wrong pid (previously if waitpid() failed we'd still look at status,
> >     which could contain complete garbage!)
> 
> Yeah, the repeated "if (!in_signal)" look a bit ugly, but fixing
> that "we only deal with ifexited in in_signal case" to do the right
> thing would make the code even more annoying and harder to maintain.

OK. Let me see if I can clean this up into a full series that actually fixes the race you saw, and breaks down the other fixes a bit more.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 15 of 17 in “Is t7006-pager.sh racy?”
  1. Junio C HamanoOct 24, 2021
  2. SZEDER GáborOct 24, 2021
  3. Jeff KingOct 25, 2021
  4. SZEDER GáborOct 28, 2021
  5. Jeff KingOct 28, 2021
  6. Jeff KingNov 21, 2021
  7. Jeff KingNov 21, 2021
  8. t7006: clean up SIGPIPE handling in trace2 testsJeff King, Nov 21, 2021
  9. Jeff KingNov 21, 2021
  10. Junio C HamanoNov 22, 2021
  11. Jeff KingNov 22, 2021
  12. Jeff KingNov 22, 2021
  13. Junio C HamanoNov 22, 2021
  14. Junio C HamanoNov 22, 2021
  15. Jeff KingNov 22, 2021
  16. run-command: unify signal and regular logic for wait_or_whine()Jeff King, Nov 22, 2021
  17. Ævar Arnfjörð BjarmasonDec 1, 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.