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>
Sun, 30 Sep 2018 16:40:42 +0000 (17:40 +0100)
commit03ea47e3e05cc85d0a73ad6842b0328d4d39589f
tree6034faeb7643d51699b6e47bc8c810f191755b4d
parentb20b72369c60d3b85c4a65b783ee708be0cd5847
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