{"action":"created","issue":{"url":"https://api.github.com/repos/lutris/lutris/issues/1415","repository_url":"https://api.github.com/repos/lutris/lutris","labels_url":"https://api.github.com/repos/lutris/lutris/issues/1415/labels{/name}","comments_url":"https://api.github.com/repos/lutris/lutris/issues/1415/comments","events_url":"https://api.github.com/repos/lutris/lutris/issues/1415/events","html_url":"https://github.com/lutris/lutris/pull/1415","id":391375822,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTA5NjU1","number":1415,"title":"Use PR_SET_CHILD_SUBREAPER to detect grandchildren","user":{"login":"AaronOpfer","id":1189089,"node_id":"MDQ6VXNlcjExODkwODk=","avatar_url":"https://avatars2.githubusercontent.com/u/1189089?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronOpfer","html_url":"https://github.com/AaronOpfer","followers_url":"https://api.github.com/users/AaronOpfer/followers","following_url":"https://api.github.com/users/AaronOpfer/following{/other_user}","gists_url":"https://api.github.com/users/AaronOpfer/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronOpfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronOpfer/subscriptions","organizations_url":"https://api.github.com/users/AaronOpfer/orgs","repos_url":"https://api.github.com/users/AaronOpfer/repos","events_url":"https://api.github.com/users/AaronOpfer/events{/privacy}","received_events_url":"https://api.github.com/users/AaronOpfer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-15T12:54:28Z","updated_at":"2018-12-17T05:44:00Z","closed_at":"2018-12-16T19:58:04Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/lutris/lutris/pulls/1415","html_url":"https://github.com/lutris/lutris/pull/1415","diff_url":"https://github.com/lutris/lutris/pull/1415.diff","patch_url":"https://github.com/lutris/lutris/pull/1415.patch"},"body":"Fixes #1413.\r\n\r\nLutris' process monitor right now cannot properly follow \"fork-and-die\" processes. The grandchild process is invisible to Lutris and then Lutris kills the runner.\r\n\r\nThis changeset sets [`PR_SET_CHILD_SUBREAPER`](http://man7.org/linux/man-pages/man2/prctl.2.html) so that these grandchild processes become child processes of Lutris instead, and Lutris can track them properly.\r\n\r\nNote that fix will only be effective in Linux 3.4+ as that is when `PR_SET_CHILD_SUBREAPER` was introduced."},"comment":{"url":"https://api.github.com/repos/lutris/lutris/issues/comments/447728812","html_url":"https://github.com/lutris/lutris/pull/1415#issuecomment-447728812","issue_url":"https://api.github.com/repos/lutris/lutris/issues/1415","id":447728812,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzcyODgxMg==","user":{"login":"AaronOpfer","id":1189089,"node_id":"MDQ6VXNlcjExODkwODk=","avatar_url":"https://avatars2.githubusercontent.com/u/1189089?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronOpfer","html_url":"https://github.com/AaronOpfer","followers_url":"https://api.github.com/users/AaronOpfer/followers","following_url":"https://api.github.com/users/AaronOpfer/following{/other_user}","gists_url":"https://api.github.com/users/AaronOpfer/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronOpfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronOpfer/subscriptions","organizations_url":"https://api.github.com/users/AaronOpfer/orgs","repos_url":"https://api.github.com/users/AaronOpfer/repos","events_url":"https://api.github.com/users/AaronOpfer/events{/privacy}","received_events_url":"https://api.github.com/users/AaronOpfer/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T05:44:00Z","updated_at":"2018-12-17T05:44:00Z","author_association":"CONTRIBUTOR","body":"I haven't debugged the code to confirm any of this, but I'm puzzled by the usage of a thread. While it seems reasonable that you would have a dedicated thread for managing another process' stdin/stdout in a vacuum, it looks like `thread.py` passes all of that event management responsibility over to Glib (which I presume is async/event dispatch based). Maybe historically a dedicated thread was necessary, but it doesn't look like it is necessary now. In fact, I *think* the OS backing thread behind the `LutrisThread` object may actually have exited by the end of the `run` method, after which the glib heartbeat is what's keeping the `LutrisThread` object alive. It's an awkward interaction; I think you may be able to make `__init__` call `run()` and stop inheriting from `thread.Thread` and everything would end up working the same way.\r\n\r\nI don't know any of this for certain. I'd love to hear you fill in the gaps in my presumptions :slightly_smiling_face: "}}
{"actor":{"display_login":"AaronOpfer"}}