{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/731","repository_url":"https://api.github.com/repos/libuv/libuv","labels_url":"https://api.github.com/repos/libuv/libuv/issues/731/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/731/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/731/events","html_url":"https://github.com/libuv/libuv/issues/731","id":135747450,"number":731,"title":"Proposal: uv_getlogin()","user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/libuv/libuv/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/libuv/libuv/labels/pending-review","name":"pending-review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-23T14:11:11Z","updated_at":"2016-02-24T12:23:53Z","closed_at":null,"body":"If the maintainers are OK with it, I'd like to take a shot at implementing a `uv_getlogin()` function.\r\n\r\nI talked to @saghul about this a while back on IRC ([logs](http://logs.nodejs.org/libuv/2015-12-14#20:57:41.595)). He suggested creating a `uv_uid_t` containing a `char *` for the username, and a `uid_t` for the uid, which would be -1 on Windows. He also suggested opening an issue here to get more input on the proposal.\r\n\r\nAlso refs https://github.com/libuv/libuv/issues/11."},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/188226731","html_url":"https://github.com/libuv/libuv/issues/731#issuecomment-188226731","issue_url":"https://api.github.com/repos/libuv/libuv/issues/731","id":188226731,"user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","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":"2016-02-24T12:23:53Z","updated_at":"2016-02-24T12:23:53Z","body":"The idea is to implement it as `getpwuid_(geteuid())`?  How are you going to copy out the username string when the `username` field is a `char*`?\r\n\r\nAside, I wouldn't call the struct `uv_uid_t` - it looks too similar to `uid_t`, which is not an aggregate type."}}