thanks for taking the time to update your patch
unfortunately, it fails on wine regression test
the attached patch should solve this
[patch.ctrlc](/uploads/84ae84d1c5cf3d3dfc19904c673bc906/patch.ctrlc)
also, any reason you changed the ctrl event for and automatic reset?
actually, I was puzzled with the previous versions with a manual reset (my first guess would have been to implement it with an automatic reset)
I tried things like '(dir /s \* || echo aaaaa) && dir *' (and halting the first dir command with ctrl-c) on native:
* does break the first dir command, * executes the RHS of || (as the dir command failed because of the ctrl-c), * prints the 'aaaaa' string * executes the RHS of && (as last command of LHS, eg echo, did succeed), * outputs just the directory header (but nothing else) for the second dir
which fits better with a manual reset (it could be implemented in native with something else, like a global variable set in the event handler -requires atomic ops-)