common: Fix gnupg_wait_processes.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 19 Sep 2017 03:28:43 +0000 (12:28 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 8 Oct 2018 15:36:01 +0000 (16:36 +0100)
commit6b37c5d156daecadbf2066a265ca451dfa867113
tree8545b4d5786827290d66246f5e3cd1e9ce0b925f
parent4f8e3cb31cdf097f9d17a8f79a254836adaabff7
common: Fix gnupg_wait_processes.

* common/exechelp-posix.c (gnupg_wait_processes): Loop for r_exitcodes
even if we already see an error.

--

The value stored by waitpid for exit code is encoded;  It requires
decoded by WEXITSTATUS macro, regardless of an error.

For example, when one of processes is already exited and another is
still running, it resulted wrong value of in r_exitcodes[n].

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit eeb3da6eb717ed6a1a1069a7611eb37503e8672d)

Gbp-Pq: Topic from-master
Gbp-Pq: Name common-Fix-gnupg_wait_processes.patch
common/exechelp-posix.c