common: Fix gnupg_wait_processes.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 19 Sep 2017 03:28:43 +0000 (12:28 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 19 Sep 2017 03:28:43 +0000 (12:28 +0900)
commiteeb3da6eb717ed6a1a1069a7611eb37503e8672d
tree4520a6a7d640c711a66a20c3063c2c62e684c4e9
parent384a3748d9022b7ae3f629c13f92e204565fea3d
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>
common/exechelp-posix.c