diff options
-rw-r--r-- | src/spawn-posix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/spawn-posix.c b/src/spawn-posix.c index ac4c4ce..d33bade 100644 --- a/src/spawn-posix.c +++ b/src/spawn-posix.c @@ -703,8 +703,13 @@ _gpgrt_wait_processes (const char **pgmnames, pid_t *pids, size_t count, { int status = -1; + /* Skip invalid PID. */ if (pids[i] == (pid_t)(-1)) - return 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)) |