Skip to content
  • Alexander Vershilov's avatar
    Install toplevel handler inside fork. · 895a131f
    Alexander Vershilov authored and Ben Gamari's avatar Ben Gamari committed
    When rts is forked it doesn't update toplevel handler, so UserInterrupt
    exception is sent to Thread1 that doesn't exist in forked process.
    
    We install toplevel handler when fork so signal will be delivered to the
    new main thread.
    
    Fixes #12903
    
    Reviewers: simonmar, austin, erikd, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2770
    
    GHC Trac Issues: #12903
    895a131f