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: Avoid child processes inheriting all file handles #99107

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Nov 12, 2024

Before this PR, child processes would inherit all the open handles. Handle inheritance is needed so both parent and child can communicate via pipes. However, full inheritance could lead to hard to diagnose file-in-use (sharing violation) issues in cases either the editor or the running project has to run external commands.

This PR adds use of the extended API to condition the spawning of a child process, that gives fine-grained control on the set of inheritable handles. Now only the pipes are inherited.

Version for 4.3 submitted as #99108.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with execute_with_pipe, seems to be working fine.

@Repiteo Repiteo merged commit 190670d into godotengine:master Nov 12, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 12, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants