{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/1587","repository_url":"https://api.github.com/repos/libuv/libuv","labels_url":"https://api.github.com/repos/libuv/libuv/issues/1587/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/1587/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/1587/events","html_url":"https://github.com/libuv/libuv/issues/1587","id":262908853,"number":1587,"title":"uv_pipe_t, uv_write2(), uv_pipe_pending_{count,type}(): why is it designed the way it is?","user":{"login":"EdSchouten","id":736085,"avatar_url":"https://avatars1.githubusercontent.com/u/736085?v=4","gravatar_id":"","url":"https://api.github.com/users/EdSchouten","html_url":"https://github.com/EdSchouten","followers_url":"https://api.github.com/users/EdSchouten/followers","following_url":"https://api.github.com/users/EdSchouten/following{/other_user}","gists_url":"https://api.github.com/users/EdSchouten/gists{/gist_id}","starred_url":"https://api.github.com/users/EdSchouten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdSchouten/subscriptions","organizations_url":"https://api.github.com/users/EdSchouten/orgs","repos_url":"https://api.github.com/users/EdSchouten/repos","events_url":"https://api.github.com/users/EdSchouten/events{/privacy}","received_events_url":"https://api.github.com/users/EdSchouten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-04T19:49:16Z","updated_at":"2017-10-05T11:33:44Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI'm interested in using libuv inside of sandboxed applications ([Capsicum](https://wiki.freebsd.org/Capsicum)). One of the things I was happy to see is that libuv provides some support for UNIX file descriptor passing (i.e., `sendmsg()` and `recvmsg()` with `SCM_RIGHTS`). That said, the way it's been designed, it has some restrictions:\r\n\r\n- There is only support for attaching a single file descriptor to a write. `uv_write2()` doesn't take an array of file descriptors; just a single descriptor.\r\n- On the receiving side, file descriptors have to be fetched using `uv_accept()`. This function can only accept streams; not arbitrary handles. This means you can't use this approach to pass in regular files, directories, etc.\r\n\r\nBefore sending pull requests or discussing any API changes, I'm actually interested in knowing what the intended use case of this API is. Is any piece of software out there making use of this?"},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/334438406","html_url":"https://github.com/libuv/libuv/issues/1587#issuecomment-334438406","issue_url":"https://api.github.com/repos/libuv/libuv/issues/1587","id":334438406,"user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars0.githubusercontent.com/u/275871?v=4","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T11:33:44Z","updated_at":"2017-10-05T11:33:44Z","author_association":"OWNER","body":"> Is any piece of software out there making use of this?\r\n\r\nMost certainly.  Node.js, its child_process and cluster modules in particular, are pretty much built around it.\r\n\r\nThe answer to your other question, why it works the way it does, is essentially 'Windows.'"}}
{"actor":{"display_login":"bnoordhuis"}}