Skip to content

Conversation

@nat-goodspeed
Copy link

This pull request depends on #10. That changeset displays as part of this comparison.

This PR provides a high-level feature -- asynchronous child-process termination notification -- using two distinct platform-specific initializers with the same name and signature, permitting portable consumer code.

Originally we simply passed in the hProcess obtained by CreateProcess().
Unfortunately that left the completion callback vulnerable to the business
logic closing the handle, meaning we could not obtain the child process
termination code. Duplicating the handle and passing the duplicate solves that
issue.

Also, the object_handle must survive until its async_wait() call has
called its completion handler. Otherwise the handler is called too soon
(immediately!) while the child process is still running.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant