{"action":"created","issue":{"url":"https://api.github.com/repos/Tribler/tribler/issues/2173","repository_url":"https://api.github.com/repos/Tribler/tribler","labels_url":"https://api.github.com/repos/Tribler/tribler/issues/2173/labels{/name}","comments_url":"https://api.github.com/repos/Tribler/tribler/issues/2173/comments","events_url":"https://api.github.com/repos/Tribler/tribler/issues/2173/events","html_url":"https://github.com/Tribler/tribler/pull/2173","id":153665929,"number":2173,"title":"WIP: Created a new process checker","user":{"login":"devos50","id":1707075,"avatar_url":"https://avatars.githubusercontent.com/u/1707075?v=3","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-08T16:53:11Z","updated_at":"2016-05-09T10:01:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Tribler/tribler/pulls/2173","html_url":"https://github.com/Tribler/tribler/pull/2173","diff_url":"https://github.com/Tribler/tribler/pull/2173.diff","patch_url":"https://github.com/Tribler/tribler/pull/2173.patch"},"body":"I've implemented a new checker that checks whether a Tribler process is already running in the specific state dir. This means that it is now possible to run several Tribler instances besides each other (under the condition they are using a separate state dir).\r\n\r\nThe method I'm using makes use of a lock file. When Tribler is in use, a `.lock` file should be written away, containing the PID of the running Tribler process. Other Tribler processes that are starting, are checking for this file and the PID inside the file to determine whether we have another Tribler running. I removed the `SingleInstanceChecker` class since we are not using that file anymore.\r\n\r\nDuring the review, please check whether no inconsistent states can occur (i.e. the checker reporting that another instance is already running while there isn't and vice versa). I think this implementation works but maybe I forgot a specific case or something like that.\r\n\r\nFixes #2148 "},"comment":{"url":"https://api.github.com/repos/Tribler/tribler/issues/comments/217824535","html_url":"https://github.com/Tribler/tribler/pull/2173#issuecomment-217824535","issue_url":"https://api.github.com/repos/Tribler/tribler/issues/2173","id":217824535,"user":{"login":"lfdversluis","id":3618917,"avatar_url":"https://avatars.githubusercontent.com/u/3618917?v=3","gravatar_id":"","url":"https://api.github.com/users/lfdversluis","html_url":"https://github.com/lfdversluis","followers_url":"https://api.github.com/users/lfdversluis/followers","following_url":"https://api.github.com/users/lfdversluis/following{/other_user}","gists_url":"https://api.github.com/users/lfdversluis/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdversluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdversluis/subscriptions","organizations_url":"https://api.github.com/users/lfdversluis/orgs","repos_url":"https://api.github.com/users/lfdversluis/repos","events_url":"https://api.github.com/users/lfdversluis/events{/privacy}","received_events_url":"https://api.github.com/users/lfdversluis/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T10:01:48Z","updated_at":"2016-05-09T10:01:48Z","body":"process the comments and I am happy as it is :+1: "}}