Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows handle fix part 3 #2270

Merged
merged 3 commits into from
Sep 11, 2019

Conversation

MonsieurNicolas
Copy link
Contributor

Description

This PR is the latest attempt at fixing a race condition when spawning processes in Windows.

Previous attempts were #2253 and #1987

Third time should do it:

using PROC_THREAD_ATTRIBUTE_HANDLE_LIST requires to set bInheritHandles =TRUE in CreateProcess (so #2253 was wrong, and the pieces that were working were by pure luck)
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute

the problem was actually that #1987 didn't set PROC_THREAD_ATTRIBUTE_HANDLE_LIST when redirecting stdout, this was causing all inheritable handles to be inherited.

@MonsieurNicolas MonsieurNicolas added this to In progress in v12.0.0 via automation Sep 10, 2019
@graydon
Copy link
Contributor

graydon commented Sep 10, 2019

r+ dffc866

@MonsieurNicolas
Copy link
Contributor Author

@latobarita: retry

@MonsieurNicolas
Copy link
Contributor Author

(travis timed out talking to ubuntu servers)

latobarita added a commit that referenced this pull request Sep 10, 2019
Windows handle fix part 3

Reviewed-by: graydon
@latobarita latobarita merged commit dffc866 into stellar:master Sep 11, 2019
v12.0.0 automation moved this from In progress to Done Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v12.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants