{"action":"closed","issue":{"url":"https://api.github.com/repos/weechat/weechat/issues/465","labels_url":"https://api.github.com/repos/weechat/weechat/issues/465/labels{/name}","comments_url":"https://api.github.com/repos/weechat/weechat/issues/465/comments","events_url":"https://api.github.com/repos/weechat/weechat/issues/465/events","html_url":"https://github.com/weechat/weechat/issues/465","id":95591100,"number":465,"title":"Crash with file descriptor number higher than 1024","user":{"login":"flashcode","id":1776783,"avatar_url":"https://avatars.githubusercontent.com/u/1776783?v=3","gravatar_id":"","url":"https://api.github.com/users/flashcode","html_url":"https://github.com/flashcode","followers_url":"https://api.github.com/users/flashcode/followers","following_url":"https://api.github.com/users/flashcode/following{/other_user}","gists_url":"https://api.github.com/users/flashcode/gists{/gist_id}","starred_url":"https://api.github.com/users/flashcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flashcode/subscriptions","organizations_url":"https://api.github.com/users/flashcode/orgs","repos_url":"https://api.github.com/users/flashcode/repos","events_url":"https://api.github.com/users/flashcode/events{/privacy}","received_events_url":"https://api.github.com/users/flashcode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/weechat/weechat/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"flashcode","id":1776783,"avatar_url":"https://avatars.githubusercontent.com/u/1776783?v=3","gravatar_id":"","url":"https://api.github.com/users/flashcode","html_url":"https://github.com/flashcode","followers_url":"https://api.github.com/users/flashcode/followers","following_url":"https://api.github.com/users/flashcode/following{/other_user}","gists_url":"https://api.github.com/users/flashcode/gists{/gist_id}","starred_url":"https://api.github.com/users/flashcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flashcode/subscriptions","organizations_url":"https://api.github.com/users/flashcode/orgs","repos_url":"https://api.github.com/users/flashcode/repos","events_url":"https://api.github.com/users/flashcode/events{/privacy}","received_events_url":"https://api.github.com/users/flashcode/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/weechat/weechat/milestones/5","html_url":"https://github.com/weechat/weechat/milestones/1.3","labels_url":"https://api.github.com/repos/weechat/weechat/milestones/5/labels","id":939732,"number":5,"title":"1.3","description":"","creator":{"login":"flashcode","id":1776783,"avatar_url":"https://avatars.githubusercontent.com/u/1776783?v=3","gravatar_id":"","url":"https://api.github.com/users/flashcode","html_url":"https://github.com/flashcode","followers_url":"https://api.github.com/users/flashcode/followers","following_url":"https://api.github.com/users/flashcode/following{/other_user}","gists_url":"https://api.github.com/users/flashcode/gists{/gist_id}","starred_url":"https://api.github.com/users/flashcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flashcode/subscriptions","organizations_url":"https://api.github.com/users/flashcode/orgs","repos_url":"https://api.github.com/users/flashcode/repos","events_url":"https://api.github.com/users/flashcode/events{/privacy}","received_events_url":"https://api.github.com/users/flashcode/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":22,"state":"open","created_at":"2015-01-17T10:52:32Z","updated_at":"2015-07-18T18:06:20Z","due_on":"2015-08-01T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-07-17T05:39:19Z","updated_at":"2015-07-18T18:06:20Z","closed_at":"2015-07-18T18:06:20Z","body":"WeeChat randomly crashes when there is at least one file descriptor with a number higher than 1024 (and which is used via `hook_fd`).\r\n\r\nThis is because the `select` function is used and the `fd_set` used supports file descriptor numbers up to 1024, any higher number can crash WeeChat.\r\nThis can happen when running a lot of `hook_process` (for example 1000), because each process is tracked by WeeChat using pipes (and calls to `hook_fd` on pipes).\r\n\r\nOne solution would be to use `poll` instead of `select`, and then build an array of `struct pollfd`, which is not limited in size.\r\n\r\nI am not sure, but this could be related to #442."}}