-
Notifications
You must be signed in to change notification settings - Fork 37
ctrl + c doesn't cancel build on windows #696
Comments
Indeed. I believe this is a general Shake issue. @ndmitchell Any ideas what could be done with this? |
@AndreasPK what is your shell? Cygwin? Mingw? Straight command prompt? The more layers of wrapping you add the less likely it is to work - but I don't think this is necessarily the fault of Shake. |
The default mingw shell (mintty). Which as I understand is also the only supported work flow. I was using build.sh instead build.bat though as the later was broken when I tried. |
Let me record my "workaround" here: when using MSYS2 MINGW64 Shell, I terminate Hadrian using the Task manager, which is awkward, but seems to work. |
@Mistuke says the following on ghc-devs:
It is unfortunately, because it's not a bug. Odds are both of you are using MinTTY which people blindly recommend to use. Because your build is triggered by a batch file, when you press ctrl+c mintty will terminate the parent process indiscriminately if it's a script, e.g. the batch process is killed but this is why you should not use MinTTY with a native Windows application. MinTTY also introduces a number of character encoding problems for native Windows applications, see Now you have two options:
TL;DR; It's not a simple issue, the application can only deal with one signal processing method at a time. |
Ctrl + c does put me back into the shell, but the build continues.
I assume the actual build is done by a subprocess which happily continues after the primary process is killed and the signal isn't properly propagated.
The text was updated successfully, but these errors were encountered: