-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
ZipFile hangs when encountering named pipe #85097
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsThe following program hangs: using System.ComponentModel;
using System.IO.Compression;
using System.Runtime.InteropServices;
var dir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName())).FullName;
int res = MkFifo(Path.Combine(dir, "fifo"), 0x1ff);
if (res != 0)
{
throw new Win32Exception();
}
ZipFile.CreateFromDirectory(dir, Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
[DllImport("libSystem.Native", EntryPoint = "SystemNative_MkFifo", SetLastError = true)]
static extern int MkFifo(string pathName, uint mode);
Instead of trying to open the fifo, we should either skip it, or throw an exception for encountering an unsupported file type.
|
Tagging subscribers to this area: @dotnet/area-system-io-compression Issue DetailsThe following program hangs: using System.ComponentModel;
using System.IO.Compression;
using System.Runtime.InteropServices;
var dir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName())).FullName;
int res = MkFifo(Path.Combine(dir, "fifo"), 0x1ff);
if (res != 0)
{
throw new Win32Exception();
}
ZipFile.CreateFromDirectory(dir, Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
[DllImport("libSystem.Native", EntryPoint = "SystemNative_MkFifo", SetLastError = true)]
static extern int MkFifo(string pathName, uint mode);
Instead of trying to open the fifo, we should either skip it, or throw an exception for encountering an unsupported file type.
|
The tar writer throws for unsupported types: runtime/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.Unix.cs Line 38 in ab2b80d
|
The following program hangs:
ZipFile
handles the fifo as a regular file. Theopen
call doesn't return (because there is no peer that has it opened for writing, and the fifo isn't opened as non-blocking).Instead of trying to open the fifo, we should either skip it, or throw an exception for encountering an unsupported file type.
The text was updated successfully, but these errors were encountered: