help
help copied to clipboard
Is there away to call uv_close without close associated file descriptor
trafficstars
I need destroy the uv_poll_t object, but keep the fd alive. is there a way to do this?
Yes. In fact, that's the standard mode of operation - you, the libuv user, are responsible for closing the corresponding file descriptor.
accord the documents: http://docs.libuv.org/en/v1.x/handle.html uv_close
Handles that wrap file descriptors are closed immediately but close_cb will still be deferred to the next iteration of the event loop. It gives you a chance to free up any resources associated with the handle.
If that's the standard mode of operation, maybe this document should be modifed.
I mean it's the standard mode of operation for uv_poll_t. Its documentation mentions how it's different from libuv's general mode of operation.