Skip to content
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

win: _get_osfhandle crashes when getting the handle for an fd #671

Closed
jorangreef opened this issue May 27, 2017 · 4 comments
Closed

win: _get_osfhandle crashes when getting the handle for an fd #671

jorangreef opened this issue May 27, 2017 · 4 comments

Comments

@jorangreef
Copy link

This is specific to Windows.

It might be more of a libuv issue (see joyent/libuv#1493) but when writing bindings using NAN is there any NAN wrapper that could expose libuv's _get_osfhandle to get the Handle for an fd?

I think the problem for bindings is that the fd is opened by the code compiled as part of Node, but _get_osfhandle can't lookup that fd when called from code compiled as part of a binding.

I think at present there is no way to resolve an fd to a Handle on Windows from a native add-on binding (i.e. any bindings that do fs work can't accept fds on Windows)?

@jorangreef
Copy link
Author

Just to be clear _get_osfhandle is part of the Windows API, but we need a way for bindings to have access to the same _get_osfhandle linked by libuv.

@addaleax
Copy link
Member

FYI: nodejs/node#6369 & libuv/libuv#1323

@jorangreef
Copy link
Author

Thanks

@bnoordhuis
Copy link
Member

Closing, libuv/libuv#1323 happened.

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

No branches or pull requests

3 participants