On Thu, Jan 23, 2014 at 3:07 PM, Fedor Indutny <[email protected]> wrote:
> I had some time to consider it and finally have one question. Should
> we require users to accept all incoming fds in read_cb?

Is there a way for libuv to get notified by the operating system about
incoming file descriptors without actually accepting them?*

If the answer is 'no' (which I believe it is), then in order to avoid
leaks, you either have to pass all file descriptors on to the user or
close the ones that the user didn't accept.

* There is a venerable UNIX trick of parking idle file descriptors
inside a socketpair to get around low ulimits.  It works because the
limit on file descriptors inside SCM_RIGHTS messages is usually much
higher than the per-process file descriptor limit.  Of course, a
socketpair is strictly a FIFO so this trick is only useful if the
order in which you reuse file descriptors is predetermined.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to