-
Notifications
You must be signed in to change notification settings - Fork 34
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
No access to uv_get_osfhandle from N-API #318
Comments
It would be better to obviate the need for Fix that by linking against node's copy and things like |
Thanks, @bnoordhuis! I was wondering how to make a fix that you said. Can you help me with this? What I need to add to my code or what I need to configure? I saw, that in libuv function |
Add-ons use node's I haven't fully thought out how yet but add-ons should stop using I don't know if node.exe currently re-exports symbols from msvcrt.lib. If the answer is "no, it doesn't", then that's the first order of business. |
Hmm @bnoordhuis, I discovered something interesting: I have tried to use |
Experiment! :-) Clone node and node-gyp and see if you can make it work locally. Once you have an idea of what's involved, we can discuss next steps. node-gyp accepts a |
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). PR-URL: nodejs#22365 Fixes: nodejs#21671 Fixes: nodejs#15433 Refs: nodejs#21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). PR-URL: #22365 Fixes: #21671 Fixes: #15433 Refs: #21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). PR-URL: #22365 Fixes: #21671 Fixes: #15433 Refs: #21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). PR-URL: nodejs#22365 Fixes: nodejs#21671 Fixes: nodejs#15433 Refs: nodejs#21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). Backport-PR-URL: #24103 PR-URL: #22365 Fixes: #21671 Fixes: #15433 Refs: #21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
As mentioned by @primeare it works fine to Personally I'm not sure if I'd like to see N-API be a general ECMAScript engine native API with node-specific escape hatches or to be quite node-concept specific. For example, should it expose In any case, I think exposing |
napi_get_uv_event_loop is odd, we might have made a mistake on that one but I can't remember the history on that one. |
I'm going to close this as there has been no follow up from the op for quite some time. Closing, please let us know if that is not the right thing to do. |
The problem is that file descriptors returned by Node.js cannot be used to convert them into Windows file handlers (for instance using
_get_osfhandle
from Windows API). That problem was disscussed before in issues: node#6369 and libuv#1323. Libuv team has madeuv__get_osfhandle
function public to use inside of native addons, and I think this function solves the problem, but there is no port of this function into N-API.The text was updated successfully, but these errors were encountered: