pager: refactor wait_for_pager() function
commit61ff12fa50b051141dd3b451d74dde76a87fece3
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 2 Feb 2021 01:59:57 +0000 (2 02:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Feb 2021 05:15:58 +0000 (1 21:15 -0800)
treeccd05c435f4d3b013c32f8f10a5082dd1218ef1d
parente6362826a0409539642a5738db61827e5978e2e4
pager: refactor wait_for_pager() function

Refactor the wait_for_pager() function. Since 507d7804c0b (pager:
don't use unsafe functions in signal handlers, 2015-09-04) the
wait_for_pager() and wait_for_pager_atexit() callers diverged on more
than they shared.

Let's extract the common code into a new close_pager_fds() helper, and
move the parts unique to the only to callers to those functions.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pager.c