Sign in to follow this  
Followers 0
phaze424

Send SIGINT to console app

2 posts in this topic

#1 ·  Posted (edited)

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



I am also interested in this :mellow:

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  
Followers 0