-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Zip.Unix: don't hang when creating zip file from directory with named pipe. #85301
Conversation
… pipe. When we open the named pipe for reading, that call will block indefinitely when there is no writer to provide data. And if we manage to read data from a pipe, that data was probably meant for someone else. Rather than opening named pipes, throw an IOException indicating they are not supported. And like the named pipes, this also treat character devices, block devices, and sockets as unsupported types.
Tagging subscribers to this area: @dotnet/area-system-io-compression Issue DetailsWhen we open the named pipe for reading, that call will block indefinitely when there is no writer to provide data. And if we manage to read data from a pipe, that data was probably meant for someone else. Rather than opening named pipes, throw an IOException indicating they are not supported. And like the named pipes, this also treat character devices, block devices, and sockets as unsupported types. Fixes #85097. @dotnet/area-system-io ptal.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, @tmds. Thanks for submitting this PR.
Just left some minor suggestions, and we need to run runtime-extra-platforms to ensure tvOS/iOS pass.
src/libraries/System.IO.Compression.ZipFile/src/Resources/Strings.resx
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.Unix.cs
Show resolved
Hide resolved
src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs
Show resolved
Hide resolved
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
@carlossanlop thanks for the thorough review! |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Ran runtime-extra-platforms again because the last commit cancelled that run. Let's wait and confirm the results look good in the re-enabled Apple platforms. |
The tvOS job showed an error for creating the fifo. I don't know if there is an iOS job, but I imagine it would have the same issue. I've re-disabled the platforms. |
This should be good to merge. |
Yes, this is ready. I opened an issue for the chrome failure in wasm (unrelated). |
When we open the named pipe for reading, that call will block indefinitely when there is no writer to provide data.
And if we manage to read data from a pipe, that data was probably meant for someone else.
Rather than opening named pipes, throw an IOException indicating they are not supported.
And like the named pipes, this also treat character devices, block devices, and sockets as unsupported types.
Fixes #85097.
@dotnet/area-system-io ptal.