Skip to content

Foundation: rework handling for ECANCELED #4611

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
Jul 9, 2022
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jul 8, 2022

Windows does not have a proper POSIX equivalent to ECANCELED. The
closes equivalent appears to be WSAECANCELLED which is a WinSock error
code for a cancelled operation. The Windows Error ERROR_CANCELLED
(0x04c7) is the ideal mapping even though the error code resides in a
different domain. As long as the error code is compared via name, this
should be safe.

Windows does not have a proper POSIX equivalent to `ECANCELED`.  The
closes equivalent appears to be `WSAECANCELLED` which is a WinSock error
code for a cancelled operation.  The Windows Error `ERROR_CANCELLED`
(0x04c7) is the ideal mapping even though the error code resides in a
different domain.  As long as the error code is compared via name, this
should be safe.
@compnerd
Copy link
Member Author

compnerd commented Jul 8, 2022

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jul 9, 2022

This is Windows specific and seems to have passed the cross-repository test. I'm going to merge this for the time being as this can potentially help resolve some issues in SourceKit-LSP.

@compnerd compnerd merged commit bbcf916 into swiftlang:main Jul 9, 2022
@compnerd compnerd deleted the error branch July 9, 2022 16:51
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.

1 participant