patch applied (ghc-6.10/packages/unix): Rewrite of signal-handling.

Ian Lynagh igloo at earth.li
Sat Feb 21 10:27:48 EST 2009


Thu Feb 19 02:05:32 PST 2009  Simon Marlow <marlowsd at gmail.com>
  * Rewrite of signal-handling.
  Ignore-this: 1579194c10020dc34af715c225a9f207
  
  The API is the same (for now).  The new implementation has the
  capability to define signal handlers that have access to the siginfo
  of the signal (#592), but this functionality is not exposed in this
  patch.
  
  #2451 is the ticket for the new API.
  
  The main purpose of bringing this in now is to fix race conditions in
  the old signal handling code (#2858).  Later we can enable the new
  API in the HEAD.
  
  Implementation differences:
  
   - More of the signal-handling is moved into Haskell.  We store the
     table of signal handlers in an MVar, rather than having a table of
     StablePtrs in the RTS.
  
   - In the threaded RTS, the siginfo of the signal is passed down the
     pipe to the IO manager thread, which manages the business of
     starting up new signal handler threads.  In the non-threaded RTS,
     the siginfo of caught signals is stored in the RTS, and the
     scheduler starts new signal handler threads.
  

     ./System/Posix/Signals.hs -> ./System/Posix/Signals.hsc
    M ./System/Posix.hs +12
    M ./System/Posix/Process.hsc -49 +6
    M ./System/Posix/Process/Internals.hs -1 +54
    M ./System/Posix/Signals.hsc -43 +115
    M ./tests/all.T +2
    A ./tests/signals004.hs

View patch online:
http://darcs.haskell.org/ghc-6.10/packages/unix/_darcs/patches/20090219100532-12142-96aa6b68806c0ca82ca34c7ab330b391901afd1d.gz


More information about the Cvs-libraries mailing list