{"action":"created","issue":{"url":"https://api.github.com/repos/scanmem/scanmem/issues/131","repository_url":"https://api.github.com/repos/scanmem/scanmem","labels_url":"https://api.github.com/repos/scanmem/scanmem/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/scanmem/scanmem/issues/131/comments","events_url":"https://api.github.com/repos/scanmem/scanmem/issues/131/events","html_url":"https://github.com/scanmem/scanmem/issues/131","id":107458955,"number":131,"title":"Signal handlers use async-signal-unsafe functions","user":{"login":"elfring","id":660477,"avatar_url":"https://avatars.githubusercontent.com/u/660477?v=3","gravatar_id":"","url":"https://api.github.com/users/elfring","html_url":"https://github.com/elfring","followers_url":"https://api.github.com/users/elfring/followers","following_url":"https://api.github.com/users/elfring/following{/other_user}","gists_url":"https://api.github.com/users/elfring/gists{/gist_id}","starred_url":"https://api.github.com/users/elfring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfring/subscriptions","organizations_url":"https://api.github.com/users/elfring/orgs","repos_url":"https://api.github.com/users/elfring/repos","events_url":"https://api.github.com/users/elfring/events{/privacy}","received_events_url":"https://api.github.com/users/elfring/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scanmem/scanmem/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/scanmem/scanmem/labels/security","name":"security","color":"b60205"}],"state":"open","locked":false,"assignee":{"login":"sriemer","id":1803210,"avatar_url":"https://avatars.githubusercontent.com/u/1803210?v=3","gravatar_id":"","url":"https://api.github.com/users/sriemer","html_url":"https://github.com/sriemer","followers_url":"https://api.github.com/users/sriemer/followers","following_url":"https://api.github.com/users/sriemer/following{/other_user}","gists_url":"https://api.github.com/users/sriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/sriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sriemer/subscriptions","organizations_url":"https://api.github.com/users/sriemer/orgs","repos_url":"https://api.github.com/users/sriemer/repos","events_url":"https://api.github.com/users/sriemer/events{/privacy}","received_events_url":"https://api.github.com/users/sriemer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/scanmem/scanmem/milestones/1","html_url":"https://github.com/scanmem/scanmem/milestones/v0.16","labels_url":"https://api.github.com/repos/scanmem/scanmem/milestones/1/labels","id":1346237,"number":1,"title":"v0.16","description":null,"creator":{"login":"sriemer","id":1803210,"avatar_url":"https://avatars.githubusercontent.com/u/1803210?v=3","gravatar_id":"","url":"https://api.github.com/users/sriemer","html_url":"https://github.com/sriemer","followers_url":"https://api.github.com/users/sriemer/followers","following_url":"https://api.github.com/users/sriemer/following{/other_user}","gists_url":"https://api.github.com/users/sriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/sriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sriemer/subscriptions","organizations_url":"https://api.github.com/users/sriemer/orgs","repos_url":"https://api.github.com/users/sriemer/repos","events_url":"https://api.github.com/users/sriemer/events{/privacy}","received_events_url":"https://api.github.com/users/sriemer/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":9,"state":"open","created_at":"2015-10-09T09:53:30Z","updated_at":"2016-04-01T07:55:59Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2015-09-21T07:37:55Z","updated_at":"2016-04-07T05:45:24Z","closed_at":null,"body":"The functions \"[exit](http://pubs.opengroup.org/onlinepubs/9699919799/functions/exit.html \"Terminate a process.\")\" and \"[show_error](https://github.com/scanmem/scanmem/blob/d89b7b22892995cf11353c64e8e25d08dde35f0c/show_message.c#L37 \"Message display\")\" do not belong to the list of [async-signal-safe functions](https://www.securecoding.cert.org/confluence/display/c/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers \"Call only asynchronous-safe functions within signal handlers.\").\r\nI guess that a different program design will be needed for your function \"[sighandler](https://github.com/scanmem/scanmem/blob/d7c5be4ef71f74f63260d83a83db8860d8cb0802/scanmem.c#L64 \"Reconsider signal handling implementation.\")\"."},"comment":{"url":"https://api.github.com/repos/scanmem/scanmem/issues/comments/206706349","html_url":"https://github.com/scanmem/scanmem/issues/131#issuecomment-206706349","issue_url":"https://api.github.com/repos/scanmem/scanmem/issues/131","id":206706349,"user":{"login":"sriemer","id":1803210,"avatar_url":"https://avatars.githubusercontent.com/u/1803210?v=3","gravatar_id":"","url":"https://api.github.com/users/sriemer","html_url":"https://github.com/sriemer","followers_url":"https://api.github.com/users/sriemer/followers","following_url":"https://api.github.com/users/sriemer/following{/other_user}","gists_url":"https://api.github.com/users/sriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/sriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sriemer/subscriptions","organizations_url":"https://api.github.com/users/sriemer/orgs","repos_url":"https://api.github.com/users/sriemer/repos","events_url":"https://api.github.com/users/sriemer/events{/privacy}","received_events_url":"https://api.github.com/users/sriemer/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T05:45:24Z","updated_at":"2016-04-07T05:45:24Z","body":"Like I already wrote: The second pipe is required as waitpid() is either blocking or non-blocking without a timeout or kernel event which would require manual polling with sleeps. Sleeps and blocking are bad in a signal handler."}}