Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Loading
  • Ben Gamari's avatar
    9fad49e0
    rts: Do not call exit() from SIGINT handler · 9fad49e0
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously `shutdown_handler` would call `stg_exit` if the scheduler was
    Oalready found to be in `SCHED_INTERRUPTING` state (or higher). However,
    `stg_exit` is not signal-safe as it calls `exit` (which calls `atexit`
    handlers). The only safe thing to do in this situation is to call
    `_exit`, which terminates with minimal cleanup.
    
    Fixes #23417.
    9fad49e0
    History
    rts: Do not call exit() from SIGINT handler
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously `shutdown_handler` would call `stg_exit` if the scheduler was
    Oalready found to be in `SCHED_INTERRUPTING` state (or higher). However,
    `stg_exit` is not signal-safe as it calls `exit` (which calls `atexit`
    handlers). The only safe thing to do in this situation is to call
    `_exit`, which terminates with minimal cleanup.
    
    Fixes #23417.
Code owners