Ticket #7653: ghc-bug7653-patch-iomanager-invalidate-fds.diff

File ghc-bug7653-patch-iomanager-invalidate-fds.diff, 630 bytes (added by nus, 15 months ago)

Invalidate the IO manager's control and wakeup fds on close

  • libraries/base/GHC/Event/Control.hs

    old new  
    117117closeControl w = do 
    118118  _ <- c_close . fromIntegral . controlReadFd $ w 
    119119  _ <- c_close . fromIntegral . controlWriteFd $ w 
     120  _ <- c_setIOManagerControlFd (-1) 
    120121#if defined(HAVE_EVENTFD) 
    121122  _ <- c_close . fromIntegral . controlEventFd $ w 
    122123#else 
    123124  _ <- c_close . fromIntegral . wakeupReadFd $ w 
    124125  _ <- c_close . fromIntegral . wakeupWriteFd $ w 
    125126#endif 
     127  _ <- c_setIOManagerWakeupFd (-1) 
    126128  return () 
    127129 
    128130io_MANAGER_WAKEUP, io_MANAGER_DIE :: Word8