{"action":"created","issue":{"url":"https://api.github.com/repos/cpppractitioners/psig/issues/1","labels_url":"https://api.github.com/repos/cpppractitioners/psig/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cpppractitioners/psig/issues/1/comments","events_url":"https://api.github.com/repos/cpppractitioners/psig/issues/1/events","html_url":"https://github.com/cpppractitioners/psig/pull/1","id":107594816,"number":1,"title":"Proposal for ease of use extensions","user":{"login":"dcdillon","id":2372155,"avatar_url":"https://avatars.githubusercontent.com/u/2372155?v=3","gravatar_id":"","url":"https://api.github.com/users/dcdillon","html_url":"https://github.com/dcdillon","followers_url":"https://api.github.com/users/dcdillon/followers","following_url":"https://api.github.com/users/dcdillon/following{/other_user}","gists_url":"https://api.github.com/users/dcdillon/gists{/gist_id}","starred_url":"https://api.github.com/users/dcdillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcdillon/subscriptions","organizations_url":"https://api.github.com/users/dcdillon/orgs","repos_url":"https://api.github.com/users/dcdillon/repos","events_url":"https://api.github.com/users/dcdillon/events{/privacy}","received_events_url":"https://api.github.com/users/dcdillon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-21T20:45:02Z","updated_at":"2015-09-22T15:42:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cpppractitioners/psig/pulls/1","html_url":"https://github.com/cpppractitioners/psig/pull/1","diff_url":"https://github.com/cpppractitioners/psig/pull/1.diff","patch_url":"https://github.com/cpppractitioners/psig/pull/1.patch"},"body":"I took a first pass at creating an \"easy to use\" interface to psig.\r\n\r\nBasically you instantiate a `signal_manager`.  When you call `init()` on it, you tell it what signals you want to capture and all signals are masked on the current thread.  When you call `exec()` on it, all signals are unmasked and the `sigwaitinfo()` loop is started.\r\n\r\nIt has two callbacks that can be registered with the call to `exec()`.  They are a signal handler and an exit handler.  The signal handler is called every time `sigwaitinfo()` returns a valid signal.  The exit handler is called when the `sigwaitinfo()` loop is exited.\r\n\r\nThis is just a proposal to get things started.  @cknite please take a look and let me know if you think it's a good start or if you have a different idea of how this can work.\r\n\r\nAn example is included in `examples/exit_on_any_signal.cpp`."},"comment":{"url":"https://api.github.com/repos/cpppractitioners/psig/issues/comments/142328258","html_url":"https://github.com/cpppractitioners/psig/pull/1#issuecomment-142328258","issue_url":"https://api.github.com/repos/cpppractitioners/psig/issues/1","id":142328258,"user":{"login":"cknite","id":10067345,"avatar_url":"https://avatars.githubusercontent.com/u/10067345?v=3","gravatar_id":"","url":"https://api.github.com/users/cknite","html_url":"https://github.com/cknite","followers_url":"https://api.github.com/users/cknite/followers","following_url":"https://api.github.com/users/cknite/following{/other_user}","gists_url":"https://api.github.com/users/cknite/gists{/gist_id}","starred_url":"https://api.github.com/users/cknite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cknite/subscriptions","organizations_url":"https://api.github.com/users/cknite/orgs","repos_url":"https://api.github.com/users/cknite/repos","events_url":"https://api.github.com/users/cknite/events{/privacy}","received_events_url":"https://api.github.com/users/cknite/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T15:42:58Z","updated_at":"2015-09-22T15:42:58Z","body":"Awesome.\n\nI'll take a look.\n\nOn Tuesday, September 22, 2015 07:06:23 AM Daniel C. Dillon wrote:\n> Ok.  Fixed it.  I think we're ok now.\n> \n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/cpppractitioners/psig/pull/1#issuecomment-142298961\n\n"}}