-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add PipeNotAvailable error #21938
base: master
Are you sure you want to change the base?
Add PipeNotAvailable error #21938
Conversation
@@ -507,6 +507,7 @@ pub const SelfExePathError = error{ | |||
DeviceBusy, | |||
SharingViolation, | |||
PipeBusy, | |||
PipeNotAvailable, |
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.
I wonder if we'd prefer PipeUnavailable
? Not sure if we have any real naming convention for stuff like this.
The description of
From what I can tell, the most similar Linux error return for
I say this because attempting to open a pipe that actually doesn't exist on Windows returns So, my initial thoughts:
EDIT: Nothing seems off about the |
@squeek502 Could it be because of the const kind: Entry.Kind = blk: {
const attrs = dir_info.FileAttributes;
if (attrs & w.FILE_ATTRIBUTE_DIRECTORY != 0) break :blk .directory;
if (attrs & w.FILE_ATTRIBUTE_REPARSE_POINT != 0) break :blk .sym_link;
break :blk .file;
};
return Entry{
.name = name_wtf8,
.kind = kind,
}; For windows the kind can never actually be set to a .named_pipe in this Iterator, which I think should be possible. |
You're right that Windows can never return My last response was a bit convoluted, so here's some more actionable feedback:
|
Some ideas: |
Should fix #21312
The unexpected
error.Unexpected NTSTATUS=0xc00000ac
is.PIPE_NOT_AVAILABLE
in windows. So this PR adds handling for it.I believe it is similar to PipeBusy, please correct me if I am mistaken.
The stat.zig program should now exit successfully.