Send SIGINT by program?
-
Hi together, I need some help: I have an console app that must be stopped by pressing CTRL-C to allow it to shut down gracefully (including saving some data). I spawn this app by an MFC app via CreateProcess(). My problem is now, that I also want to stop it by the MFC app, i.e. send an SIGINT to the console app. But I believe that this isn't possible, is it? Does anybody has an idea how to stop my console app gracefully? TerminateProcess() unfortunately doesn't help... Thank you very much for all your help, Marcus.
-
Hi together, I need some help: I have an console app that must be stopped by pressing CTRL-C to allow it to shut down gracefully (including saving some data). I spawn this app by an MFC app via CreateProcess(). My problem is now, that I also want to stop it by the MFC app, i.e. send an SIGINT to the console app. But I believe that this isn't possible, is it? Does anybody has an idea how to stop my console app gracefully? TerminateProcess() unfortunately doesn't help... Thank you very much for all your help, Marcus.
-
If it is spawned via CreateProcess, you will get a handle on it. Can't you interact with the console window through this handle ? Send a close message or even CTRL-C keys to it ? ~RaGE();