-
Notifications
You must be signed in to change notification settings - Fork 3.8k
pipe: fixed uv_pipe_chmod for OSX Darwin #1635
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
Conversation
src/unix/pipe.c
Outdated
| return r; | ||
| } | ||
|
|
||
| /* Unfortunately fstat on a pipe has a bug on OSX Darwin */ |
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.
Nit: I don't think this comment provides enough information outside of the context of this PR. Perhaps at least say that stat is used instead of fstat due to a bug on macOS."
According to the fstat man page there is a bug in fstat on OS X that fstat on a pipe. The fstat() call had to be changed to a stat() call in order to get the correct permissions. Test cases have been modified to check the result of uv_pipe_chmod to confirm the change actually worked.
e43f0b5 to
361b518
Compare
|
I've fixed the comments for osx about fstat and stat. |
cjihrig
left a comment
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.
LGTM. @zzzjim could you rebase this.
01d8d69 to
f8268f0
Compare
According to the fstat man page there is a bug in fstat on OS X that fstat on a pipe. The fstat() call had to be changed to a stat() call in order to get the correct permissions. Test cases have been modified to check the result of uv_pipe_chmod to confirm the change actually worked.
|
@cjihrig - rebased. |
According to its man page, there is a bug in fstat() on macOS related to pipes. This commit replaces a fstat() call in uv_pipe_chmod() with a stat() call in order to get the correct permissions. PR-URL: libuv#1635 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
|
Landed in 19855c0. Thanks! |
According to the fstat man page there is a bug
in fstat on OS X that fstat on a pipe.
The fstat() call had to be changed to a stat() call
in order to get the correct permissions.
Test cases have been modified to check the result
of uv_pipe_chmod to confirm the change actually worked.