Home GnuPG
Diffusion GnuPG e33111fcdac0

common: Improve waiting for processes on POSIX.
e33111fcdac0Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

common: Improve waiting for processes on POSIX.

* common/exechelp-posix.c (struct terminated_child): New definition.
(terminated_children): New variable.
(store_result): New function.
(get_result): Likewise.
(gnupg_wait_process): Store results that were not requested and
consider previously stored results.

waitpid(2) may return information about terminated children that we
did not yet request, and there is no portable way to wait for a
specific set of children. As a workaround, we store the results of
children for later use.

  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Sep 5 2016, 1:50 PM
Parents
rGc39be0add883: common: Fix typo.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rGe33111fcdac0: common: Improve waiting for processes on POSIX. (authored by Justus Winter <justus@g10code.com>).Sep 5 2016, 2:05 PM