Skip to content

internal: Allow flycheck process to exit gracefully #17903

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

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Aug 15, 2024

Assuming it isn't cancelled. Closes #17902.

The only place CommandHandle::join() is used is when the flycheck command
finishes, so this commit changes the behavior of the method itself.

The only reason I can see for the existing behavior is if the command is somehow holding onto a build lock longer than it should, this would force it to be released. But it would be a pretty heavy-handed way to solve that issue. I'm not aware of this occurring in practice.

Assuming it isn't cancelled. Closes rust-lang#17902.

The only place CommandHandle::join is used is when the flycheck command
finishes, so this commit changes the behavior of the method itself.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 15, 2024
@Veykril
Copy link
Member

Veykril commented Aug 16, 2024

Hmm, I am pretty sure we had a reason for adding this. I believe we used to sometimes leak cargo processes because we weren't killing the process group (usually when people invoke some wrapper like thing instead of cargo directly).

@Veykril
Copy link
Member

Veykril commented Aug 16, 2024

But I might be wrong and that issue was with something else, we'll see if something crops up
@bors r+

@bors
Copy link
Contributor

bors commented Aug 16, 2024

📌 Commit da34676 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 16, 2024

⌛ Testing commit da34676 with merge 4cd8dcf...

@bors
Copy link
Contributor

bors commented Aug 16, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 4cd8dcf to master...

@bors bors merged commit 4cd8dcf into rust-lang:master Aug 16, 2024
11 checks passed
@lnicola lnicola changed the title Allow flycheck process to exit gracefully internal: Allow flycheck process to exit gracefully Aug 16, 2024
@tmandry
Copy link
Member Author

tmandry commented Aug 16, 2024

My impression from looking at the original PR is that using the process group was important when cancelling the job, because you want to be able to start the next one as soon as possible.

@tmandry tmandry deleted the graceful-exit branch August 16, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flycheck subprocess group is forcefully terminated after it has sent EOF
4 participants