Conversation
Use OpenOptions for the existing read, sharing and delete-on-close flags. Pass the file as GC stdin, then inherit stdin in the cleanup child so the standard library manages handle inheritance without raw handle APIs. Keep Command alive through the existing sleep to retain the parent handle. Keep the GC path, copy helper and process lifetime unchanged.
Inline the single-use ensure_empty helper and replace GcErr with an inline error. Preserve the existing directory and GC filename filter.
Attempt the existing GC self-cleanup even if waiting for the parent or removing cargo-home state fails. Preserve the original uninstall error when starting cleanup also fails; report the cleanup error when uninstalling succeeded.
Member
|
@Cloud0310 I think you can close this and drop the last commit over to #5088. Just deleting/pushing your branches on your fork should do the job. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proceeding of #5088.
This fixed cleanup
rustup-gc.exeeven if uninstallation fails, also keeping the error information for better tracing.