Permalink
Browse files

Retry on EINTR from kevent

  • Loading branch information...
1 parent 820f875 commit f1c5993d95fea67b933b9bf64acfac9d7f4f3ba1 @tibbe tibbe committed Dec 23, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/System/Event/KQueue.hsc
@@ -120,12 +120,10 @@ kqueue :: IO EventQ
kqueue = EventQ `fmap` throwErrnoIfMinus1
"kqueue" (fmap unEventQ c_kqueue)
--- TODO: Don't die on EINTR. Either do nothing or use
--- throwErrnoIfMinus1Retry to retry.
kevent :: EventQ -> Ptr Event -> Int -> Ptr Event -> Int -> Ptr TimeSpec
-> IO Int
kevent k chs chlen evs evlen ts
- = fmap fromIntegral $ throwErrnoIfMinus1 "kevent" $
+ = fmap fromIntegral $ throwErrnoIfMinus1Retry "kevent" $
c_kevent k chs (fromIntegral chlen) evs (fromIntegral evlen) ts
withTimeSpec :: TimeSpec -> (Ptr TimeSpec -> IO a) -> IO a

0 comments on commit f1c5993

Please sign in to comment.