diff options
author | NIIBE Yutaka <[email protected]> | 2021-04-08 02:26:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2021-05-03 17:05:14 +0000 |
commit | c2ba6bea4ce81a066765c285c4b7c1dc6d39f144 (patch) | |
tree | 66a563ab7729999e6f47c5b1eec3fb9cc1b5de66 | |
parent | agent: Skip unknown unknown ssh curves seen on cards. (diff) | |
download | gnupg-c2ba6bea4ce81a066765c285c4b7c1dc6d39f144.tar.gz gnupg-c2ba6bea4ce81a066765c285c4b7c1dc6d39f144.zip |
common: Fix gnupg_wait_processes, by skipping invalid PID.
* common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
(cherry picked from commit d82dae5d2229a30dbc78aadc4d544d30dac76a1c)
-rw-r--r-- | common/exechelp-posix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c index 07821529a..347a11be2 100644 --- a/common/exechelp-posix.c +++ b/common/exechelp-posix.c @@ -722,8 +722,13 @@ gnupg_wait_processes (const char **pgmnames, pid_t *pids, size_t count, { int status = -1; + /* Skip invalid PID. */ if (pids[i] == (pid_t)(-1)) - return my_error (GPG_ERR_INV_VALUE); + { + r_exitcodes[i] = -1; + left -= 1; + continue; + } /* See if there was a previously stored result for this pid. */ if (get_result (pids[i], &status)) |