joyent/node — pull request #6608 by rgieschke (2013-11-29 23:06:17+00:00)
Title: stream_wrap: pass unhandled accepted_fd to JavaScript

Currently, an unhandled fd that was received from another process is ignored. It was already accepted by the process, though, and will thus leak.

We should better report it as raw (Integer) fd to JavaScript, so the application can decide what to do about it. This will also allow to pass raw fds around, which is needed, e.g., to let the main process run without any privileges and have other processes (with root or with an appropriate process.setuid/process.setgid) open files for it.