Skip to content

Exiting MSYS2 shells in Windows Terminal sometimes causes "Terminate batch job (Y/N)" on Ctrl-D? #14663

Answered by DHowett
sdbbs asked this question in Q&A
Discussion options

You must be logged in to vote

So, yup, that is definitely weird.

At the heart of the issue is MSYS's use of a batch file with (potentially) improper signal handling characteristics. I'm not sure what they're setting up in there; however, we should probably support whatever it is so they don't need to ship a batch file!

That message only really originates when CMD² receives a ^C¹ while running a batch file. I'm sure it's slightly more complicated than that, but I have spent enough time this week reading CMD's source code.

Apart from trying to change how you spawn MSYS, the only knob Terminal really offers here takes effect a little too late to address your main pain point. That knob is to set "closeOnExit": "always" fo…

Replies: 7 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by DHowett
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@NullDott
Comment options

Comment options

You must be logged in to vote
1 reply
@NullDott
Comment options

Comment options

You must be logged in to vote
1 reply
@NullDott
Comment options

Comment options

You must be logged in to vote
1 reply
@DHowett
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants