Don translate UserInterrupt into ExitFailure 1, let it propagate
authorDuncan Coutts <duncan@well-typed.com>
Thu, 14 Nov 2013 16:02:03 +0000 (16:02 +0000)
committerDuncan Coutts <duncan@well-typed.com>
Thu, 14 Nov 2013 16:06:24 +0000 (16:06 +0000)
commit12cdd6da8f6338266a30c0e274689697dea671ae
tree356e2a10b4e8933b71cc99dc4b7715a1bf1479e8
parenta987b8004e83c694e00cdd47cbf43a9588eb47d4
Don translate UserInterrupt into ExitFailure 1, let it propagate

It is important that if a program recieved ^C from the user, and the
program terminates as a result, that it exit with SIGINT so that the
parent process knows that was the case. For example cabal calling ghc
will then be able to tell the difference between it failing and the user
interrupting with ^C and report (or not) appropriately.

So we should just let the UserInterrupt exception propagate to the top
level error handler which will do the right thing.

See http://www.cons.org/cracauer/sigint.html
compiler/main/GHC.hs