[PATCH 0/3] pager: test for exit behavior & trace2 bug fix
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 1, 2021, 14:49 UTC
- Message-ID
- <20210201144921.8664-1-avarab@gmail.com>
- In-Reply-To
- <87im7cng42.fsf@evledraar.gmail.com>
While reading the pager code I discovered[1] that we log the wrong exit code when the pager itself exits with non-zero under trace2. This fixes that bug.
I think whatever the consensus is on the SIGPIPE exit status propagating it makes sense if we'd ignore it to rebase the patch to do so[1] on this. I think the addition of a new "test-tool pager" there is redundant to testing SIGHUP from git itself as 1/3 does here, but maybe I'm missing something...
2/3 is not needed for the end-state here, but I figured it was a good refactoring while I was at it.
1. https://lore.kernel.org/git/bc88492979fee215d5be06ccbc246ae0171a9ced.1611910122.git.liu.denton@gmail.com/
Ævar Arnfjörð Bjarmason (3): pager: test for exit code pager: refactor wait_for_pager() function pager: properly log pager exit code when signalled
pager.c | 18 +++++-------- run-command.c | 8 ++++-- t/t7006-pager.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 13 deletions(-)
-- 2.30.0.284.gd98b1dd5eaa7