mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
common: Fix gnupg_wait_processes, by skipping invalid PID.
* common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
ac1e159397
commit
d82dae5d22
@ -732,8 +732,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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user