Jump to content
Sign in to follow this  
phaze424

Send SIGINT to console app

Recommended Posts

phaze424

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.