Skip to content

[5.5] Set isRunning of Process to false before calling the termination handler #3002

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 26, 2021

Cherry-picks #3000 to release/5.5.


Otherwise, we end up in a race condition where isRunning might still be true when accessed from inside the terminationHandler. If this is the case, accessing terminationReason or terminationStatus inside the termination handler crashes because their precondition that the task has finished are not satisfied.

Fixes rdar://78035044

…n handler

Otherwise, we end up in a race condition where `isRunning` might still be `true` when accessed from inside the `terminationHandler`. If this is the case, accessing `terminationReason` or `terminationStatus` inside the termination handler crashes because their precondition that the task has finished are not satisfied.

Fixes rdar://78035044
@ahoppen
Copy link
Member Author

ahoppen commented May 26, 2021

@swift-ci Please test

@ahoppen ahoppen changed the title Set isRunning of Process to false before calling the termination handler [5.5] Set isRunning of Process to false before calling the termination handler May 26, 2021
@spevans spevans merged commit dc04d83 into swiftlang:release/5.5 May 27, 2021
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