hinotify 0.3.4 → 0.3.5
raw patch · 2 files changed
+9/−6 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hinotify.cabal +1/−1
- src/System/INotify.hsc +8/−5
hinotify.cabal view
@@ -1,5 +1,5 @@ name: hinotify-version: 0.3.4+version: 0.3.5 build-type: Simple synopsis: Haskell binding to inotify description:
src/System/INotify.hsc view
@@ -37,7 +37,7 @@ import Prelude hiding (init) import Control.Monad import Control.Concurrent-import Control.Exception as E (bracket, catch, SomeException)+import Control.Exception as E (bracket, catch, mask_, SomeException) import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map@@ -310,15 +310,18 @@ runHandler (_, e@QOverflow) = do -- send overflows to all handlers handlers <- readMVar em flip mapM_ (Map.elems handlers) $ \handler ->- E.catch (handler e) ignore_failure -- supress errors+ ignore_failure (handler e) -- supress errors runHandler (wd, event) = do handlers <- readMVar em let handlerM = Map.lookup wd handlers case handlerM of Nothing -> putStrLn "runHandler: couldn't find handler" -- impossible?- Just handler -> E.catch (handler event) ignore_failure- ignore_failure :: SomeException -> IO ()- ignore_failure _ = return ()+ Just handler -> ignore_failure (handler event)+ ignore_failure :: IO () -> IO ()+ ignore_failure action = mask_ (action `E.catch` ignore)+ where+ ignore :: SomeException -> IO ()+ ignore _ = return () killINotify :: INotify -> IO () killINotify (INotify h _ _ tid1 tid2) =