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

rowbearto

  • Senior Community Member
  • Posts: 1541
  • Hero Points: 113
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: 4964
  • Hero Points: 409
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: 1541
  • Hero Points: 113
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: 4964
  • Hero Points: 409
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: 1541
  • Hero Points: 113
That is very very great news Clark! Thanks so much for your persistence and interest in this!

mjdl

  • Senior Community Member
  • Posts: 142
  • Hero Points: 16
  • SE 23.0.2 hotfix 2 x64 Windows 10 v1903
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: 4964
  • Hero Points: 409
This change will be in 24.0.1 which should be available before the end of the year.