diff options
author | Bartosz Sosnowski <bartosz@janeasystems.com> | 2018-08-09 11:19:15 +0200 |
---|---|---|
committer | Bartosz Sosnowski <bartosz@janeasystems.com> | 2018-08-09 11:19:15 +0200 |
commit | 8f96a5b07b7f13f1fa4fef77d35af6492aa912e0 (patch) | |
tree | f4eca9a928365b9301063f79ddfc99f606a1242e /docs/src | |
parent | 27ba66281199bdcade823677af8dedc161152fb6 (diff) | |
download | libuv-8f96a5b07b7f13f1fa4fef77d35af6492aa912e0.tar.gz libuv-8f96a5b07b7f13f1fa4fef77d35af6492aa912e0.zip |
fs: add uv_open_osfhandle
Adds uv_open_osfhandle to complete uv_get_osfhandle
Ref: https://github.com/nodejs/node/issues/15433
Ref: https://github.com/nodejs/node-addon-api/issues/304
PR-URL: https://github.com/libuv/libuv/pull/1927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/fs.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/src/fs.rst b/docs/src/fs.rst index f383e5b1..fcf70a35 100644 --- a/docs/src/fs.rst +++ b/docs/src/fs.rst @@ -403,6 +403,15 @@ Helper functions .. versionadded:: 1.12.0 +.. c:function:: int uv_open_osfhandle(uv_os_fd_t os_fd) + + For a OS-dependent handle, get the file descriptor in the C runtime. + On UNIX, returns the ``os_fd`` intact. On Windows, this calls `_open_osfhandle <https://msdn.microsoft.com/en-us/library/bdts1c9x.aspx>`_. + Note that the return value is still owned by the CRT, + any attempts to close it or to use it after closing the handle may lead to malfunction. + + .. versionadded:: 1.23.0 + File open constants ------------------- |