Jump to content

Send SIGINT to console app

Recommended Posts

I have a console application that only exits cleanly if an interrupt signal is sent to it (for example, a Ctrl+C keystroke.) Since the script itself was what started the application, I have the process name and PID of the application, and it would be fairly easy to get an hWnd of its console window. However, since ControlSend($hWnd, "", "+c") does not work (this is a known problem; apparently, console windows check the physical state of modifier keys, thus while you can send all-lowercase strings such as "command" to a console window, the WinAPI calls used for ControlSend() don't have any effect on Shift, Control, Alt, etc.), is there another way I can send a SIGINT to this application? Any help would be greatly appreciated.

Edited by phaze424
Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...