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

build-server shutdown workaround #1346

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

ooooolivia
Copy link
Contributor

The issue can be found here: dotnet/sdk#10573

# shutdown_server(verbose=True) # This is the correct way to shut down dotnet build servers, but it has been disabled due to https://github.com/dotnet/sdk/issues/10573
getLogger().info("Shutting down dotnet build servers...")
if util.iswin():
os.system('TASKKILL /F /T /IM dotnet.exe || TASKKILL /F /T /IM VSTest.Console.exe || TASKKILL /F /T /IM msbuild.exe')
Copy link
Member

Choose a reason for hiding this comment

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

The || syntax means to only run the commands after it if the first one fails. Is that the behavior that we want?

Copy link
Contributor Author

@ooooolivia ooooolivia Jun 5, 2020

Choose a reason for hiding this comment

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

This command is suggested by @wli3 . I suppose the rationale here is dotnet.exe could be the parent process that spawns the other two, so if dotnet.exe has terminated we'd like to kill the child processes that are still running. Otherwise by specifying /T will be sufficient to kill the parent and child processes together.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM

@DrewScoggins DrewScoggins merged commit 4d87d79 into dotnet:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants