Re: [PATCH] t7006: clean up SIGPIPE handling in trace2 tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2021, 06:05 UTC
- Message-ID
- <xmqq1r38n2sx.fsf@gitster.g>
- In-Reply-To
- <xmqq5yskn3ir.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Jeff King <peff@peff.net> writes: > ... >> 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.
Eh, what I meant was that it would be annoying and harder to maintain, if done inside the single "if (in_signal) { ... }" near the beginning. (IOW, I am completely in agreement with your reasoning above).