{"action":"created","issue":{"url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/122","repository_url":"https://api.github.com/repos/SirCmpwn/wlroots","labels_url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/122/comments","events_url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/122/events","html_url":"https://github.com/SirCmpwn/wlroots/issues/122","id":252702628,"number":122,"title":"Xwayland zombies","user":{"login":"martinetd","id":1729331,"avatar_url":"https://avatars0.githubusercontent.com/u/1729331?v=4","gravatar_id":"","url":"https://api.github.com/users/martinetd","html_url":"https://github.com/martinetd","followers_url":"https://api.github.com/users/martinetd/followers","following_url":"https://api.github.com/users/martinetd/following{/other_user}","gists_url":"https://api.github.com/users/martinetd/gists{/gist_id}","starred_url":"https://api.github.com/users/martinetd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinetd/subscriptions","organizations_url":"https://api.github.com/users/martinetd/orgs","repos_url":"https://api.github.com/users/martinetd/repos","events_url":"https://api.github.com/users/martinetd/events{/privacy}","received_events_url":"https://api.github.com/users/martinetd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-24T19:16:27Z","updated_at":"2017-08-24T19:17:21Z","closed_at":null,"body":"Currently if Xwayland crashes or gets killed, we will start a new Xwayland and recover back to useable state but will never attempt to reap the process, leaving a zombie behind.\r\n\r\nThe shutdown code cannot do a waitpid() call, because for example on normal Xwayland shutdown it will tell us to destroy the wl client before the process ends, so we would just deadlock.\r\n\r\nI can see two alternatives to reap this properly: \r\n * Either have an handler for SIGCHLD, this would not be xwayland specific but we could just reap stuff as they come and eventually have a list of actions for specific pid deaths (weston does that)\r\n * We could say we never will care about that process and double-fork to spawn Xwayland. It will then be taken by init and reaped whenever it dies - we will still get the notification from its wayland client being destroyed as we do now, so for all intent and purpose it will work for us.\r\nThe only thing we lose is that we will no longer know what pid Xwayland is started as - but while we store that information we never use it so it isn't a big loss.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/comments/324730805","html_url":"https://github.com/SirCmpwn/wlroots/issues/122#issuecomment-324730805","issue_url":"https://api.github.com/repos/SirCmpwn/wlroots/issues/122","id":324730805,"user":{"login":"SirCmpwn","id":1310872,"avatar_url":"https://avatars0.githubusercontent.com/u/1310872?v=4","gravatar_id":"","url":"https://api.github.com/users/SirCmpwn","html_url":"https://github.com/SirCmpwn","followers_url":"https://api.github.com/users/SirCmpwn/followers","following_url":"https://api.github.com/users/SirCmpwn/following{/other_user}","gists_url":"https://api.github.com/users/SirCmpwn/gists{/gist_id}","starred_url":"https://api.github.com/users/SirCmpwn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SirCmpwn/subscriptions","organizations_url":"https://api.github.com/users/SirCmpwn/orgs","repos_url":"https://api.github.com/users/SirCmpwn/repos","events_url":"https://api.github.com/users/SirCmpwn/events{/privacy}","received_events_url":"https://api.github.com/users/SirCmpwn/received_events","type":"User","site_admin":false},"created_at":"2017-08-24T19:17:21Z","updated_at":"2017-08-24T19:17:21Z","body":"Double fork seems like a good approach to me. What do you think?"}}
{"actor":{"display_login":"SirCmpwn"}}