Author Topic: Windows how to send Ctrl-C instead of Ctrl-Break for "stop build" alternative  (Read 11178 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Yes, I'm pretty sure it is sending a Ctrl-C event.

You can try it for yourself, I have uploaded it to support. Look for ctrlc.7z. You can try running winpty inside the process buffer as I have.

See the included README file in ctrlc.7z for how to run winkill and the other java program that sleeps as well as where to look for the source code.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Never ran your test. Although I was starting to set it up.

I'm seeing some success doing some weird stuff but it looks promising. I have to investigate further as to why it works. Keep your fingers crossed.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
OK. I found something in my winkill that is specific to my environment and I would need to change it for you to run it, otherwise it won't work for you and you'll get an error. If you are interested in doing that later then let me know and I can modify it and you can run. At least you have my source now you can refer to it.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
I think I've got this working perfectly. Didn't even need an extra process. This console code is REALLY picky and what you can and can't do is hard to figure out.

I made ntpinit.exe the new console group. Then I made sure I didn't create a new console group when starting CMD.EXE. These changes combined with tweaking the console mode and break handling were the trick. I'm still testing but it's looking really good.

Done. No new problems as far as I can tell.
« Last Edit: November 30, 2019, 09:32:22 PM by Clark »

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
That is very very great news Clark! Thanks so much for your persistence and interest in this!

mjdl

  • Senior Community Member
  • Posts: 151
  • Hero Points: 18
  • SE Pro 2023 v28.0.1.0 64-bit Qt5 Win 11 23H2
Will these changes go into the currently planned SE point release (24.0.1, or whatever it will be called)? Sounds like something useful generally, not just for running Java programs...

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
This change will be in 24.0.1 which should be available before the end of the year.