{"action":"created","issue":{"url":"https://api.github.com/repos/komarov/switchman/issues/7","labels_url":"https://api.github.com/repos/komarov/switchman/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/komarov/switchman/issues/7/comments","events_url":"https://api.github.com/repos/komarov/switchman/issues/7/events","html_url":"https://github.com/komarov/switchman/pull/7","id":86935708,"number":7,"title":"--no-lock option, making Switchman forget about locks","user":{"login":"kainwinterheart","id":581366,"avatar_url":"https://avatars.githubusercontent.com/u/581366?v=3","gravatar_id":"","url":"https://api.github.com/users/kainwinterheart","html_url":"https://github.com/kainwinterheart","followers_url":"https://api.github.com/users/kainwinterheart/followers","following_url":"https://api.github.com/users/kainwinterheart/following{/other_user}","gists_url":"https://api.github.com/users/kainwinterheart/gists{/gist_id}","starred_url":"https://api.github.com/users/kainwinterheart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kainwinterheart/subscriptions","organizations_url":"https://api.github.com/users/kainwinterheart/orgs","repos_url":"https://api.github.com/users/kainwinterheart/repos","events_url":"https://api.github.com/users/kainwinterheart/events{/privacy}","received_events_url":"https://api.github.com/users/kainwinterheart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-10T11:29:07Z","updated_at":"2015-06-10T19:31:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/komarov/switchman/pulls/7","html_url":"https://github.com/komarov/switchman/pull/7","diff_url":"https://github.com/komarov/switchman/pull/7.diff","patch_url":"https://github.com/komarov/switchman/pull/7.patch"},"body":"I've described use case in documentation."},"comment":{"url":"https://api.github.com/repos/komarov/switchman/issues/comments/110886350","html_url":"https://github.com/komarov/switchman/pull/7#issuecomment-110886350","issue_url":"https://api.github.com/repos/komarov/switchman/issues/7","id":110886350,"user":{"login":"komarov","id":174420,"avatar_url":"https://avatars.githubusercontent.com/u/174420?v=3","gravatar_id":"","url":"https://api.github.com/users/komarov","html_url":"https://github.com/komarov","followers_url":"https://api.github.com/users/komarov/followers","following_url":"https://api.github.com/users/komarov/following{/other_user}","gists_url":"https://api.github.com/users/komarov/gists{/gist_id}","starred_url":"https://api.github.com/users/komarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komarov/subscriptions","organizations_url":"https://api.github.com/users/komarov/orgs","repos_url":"https://api.github.com/users/komarov/repos","events_url":"https://api.github.com/users/komarov/events{/privacy}","received_events_url":"https://api.github.com/users/komarov/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T19:31:35Z","updated_at":"2015-06-10T19:31:35Z","body":"Hi Gennadiy,\r\n\r\nYour use case is clear and I'd say that it indeed should be supported.\r\nThe change itself looks ok: the `--no-lock` argument is a good external interface for this scenario. \r\n\r\nOne (rather OCD-ish) consideration that I have relates to `use_locks` parameter -- the name should be in singular form, not plural, since a single process won't acquire multiple locks. Maybe `use_lock`, `do_lock` or even something like `do_get_lock` would be a reasonable name.\r\n\r\nInterestingly, the tests expose the initial design deficiency with handling process-level stuff from the class code. Giving it a second thought, it seems that the problem could be solved by\r\n- returning appropriate exit code from `->run`\r\n- defining `$CHILD` as an accessor\r\n- and setting SIG handlers from the executable\r\n\r\nbut then there still remains the issue with calling `fork` from the library code, which probably means that `run` method should be dissected.\r\n\r\nI'm not planning to deal with this in the nearest future, but feel free to tackle this if you want to have less boilerplate in your future tests :)\r\n\r\nPlease let me know if you are willing to make any adjustments, otherwise I'm rather comfortable with merging this as is and releasing later this week."}}