{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/128","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/128/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/128/events","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/pull/128","id":117048466,"number":128,"title":"Mask async exceptions before spawning subprocess runners","user":{"login":"mitchellwrosen","id":1074598,"avatar_url":"https://avatars.githubusercontent.com/u/1074598?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellwrosen","html_url":"https://github.com/mitchellwrosen","followers_url":"https://api.github.com/users/mitchellwrosen/followers","following_url":"https://api.github.com/users/mitchellwrosen/following{/other_user}","gists_url":"https://api.github.com/users/mitchellwrosen/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellwrosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellwrosen/subscriptions","organizations_url":"https://api.github.com/users/mitchellwrosen/orgs","repos_url":"https://api.github.com/users/mitchellwrosen/repos","events_url":"https://api.github.com/users/mitchellwrosen/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellwrosen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-11-16T04:12:40Z","updated_at":"2015-11-18T00:21:15Z","closed_at":"2015-11-16T05:06:23Z","pull_request":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/pulls/128","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/pull/128","diff_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/pull/128.diff","patch_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/pull/128.patch"},"body":"Continuation of #127 \r\n\r\nUnfortunately I don't have a good way of getting this compiling on ghc 7.6 right now. `stack setup` says:\r\n\r\n```\r\nNo information found for ghc-7.6.\r\nSupported versions for OS key 'macosx': GhcVersion 7.8.4, GhcVersion 7.10.1, GhcVersion 7.10.2\r\n```"},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/comments/157553154","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/pull/128#issuecomment-157553154","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/128","id":157553154,"user":{"login":"mitchellwrosen","id":1074598,"avatar_url":"https://avatars.githubusercontent.com/u/1074598?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellwrosen","html_url":"https://github.com/mitchellwrosen","followers_url":"https://api.github.com/users/mitchellwrosen/followers","following_url":"https://api.github.com/users/mitchellwrosen/following{/other_user}","gists_url":"https://api.github.com/users/mitchellwrosen/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellwrosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellwrosen/subscriptions","organizations_url":"https://api.github.com/users/mitchellwrosen/orgs","repos_url":"https://api.github.com/users/mitchellwrosen/repos","events_url":"https://api.github.com/users/mitchellwrosen/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellwrosen/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T00:21:15Z","updated_at":"2015-11-18T00:21:15Z","body":"Here's a common way for an exception to leak:\r\n\r\n```\r\n        async exception can strike here\r\n        |\r\n        v\r\nforkIO ( foo `finally` bar)\r\n```\r\n\r\nand here's the Haskell solution:\r\n\r\n```\r\n                      exception cannot prevent `bar` from running\r\n                      |\r\n                      v\r\nmask_ (forkIO (restore foo `finally` bar))\r\n```\r\n\r\nwhich is exactly what `withAsync` does for you."}}