-
-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
Description
If the application has open handles to files inside the current directory when it starts Update.exe, those handles will be inherited by Update.exe and it will not be able to perform the update.
- https://github.com/rust-lang/rust/blob/cb2bd2bb06380896368b0edb02ada0117cc856be/library/std/src/sys/pal/windows/process.rs#L383
- open issue: Add new inherit_handles flag to CommandExt trait rust-lang/rust#115501
We could enumerate our own open handles, checking if they correspond to something in current and close them, or we can use CreateProcessW directly on Windows, or both.
Also see:
- Ability to stop child process from Inheriting Handles rust-lang/libs-team#264
- https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873
Might be possible to use the new "spawn_with_attributes"
Reactions are currently unavailable