-
Arian van Putten authored
Fixes #3899 When cabal new-repl spawns ghci, it spawns this as a subprocess. In UNIX like systems, if a CTRL+C is sent to this child process it also bubbles up to the parent process, causing it to terminate. Also see https://hackage.haskell.org/package/process-1.4.2.0/docs/System-Process.html#g:4. However, this is not what we want for interactive subprocesses. Interactive processes usually define their own handlers for CTRL+C, for example GHCi uses CTRL+C to reset the input buffer. So instead of terminating on CTRL+C we want to delegate CTRL+C to GHCi and let it do its thing. Luckily, we can enable CTRL+C delegation such that the parent process ignores the CTRL+C and instead delegates it to the child process.
005f6dfa