Skip to content

Conversation

@lun-4
Copy link
Contributor

@lun-4 lun-4 commented Jun 28, 2020

Closes #3880.

I took a peek at the other syscall wrappers around std.os and found inconsistencies on what EBADF means for them. Some declare EBADF as "not open file descriptor" (fchdir, lseek, llseek), or "not valid open file descriptor" (mmap), and others put their own meanings as well (fcntl, unlinkat, mkdirat, fstatat), which makes me think about if we should return error values on those calls too.

Also, I didn't change anything regarding WASI errors. WASI maps errors as well.

Copy link
Member

@kubkon kubkon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@haze haze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewrk andrewrk merged commit b1c7334 into ziglang:master Aug 20, 2020
@andrewrk
Copy link
Member

Thanks @lun-4 for your patience on this one. Good stuff

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.

Writing to a file open with read permissions panics instead of returning error

4 participants