I have a Java app that creates an external process and reads the process’ stdout through an InputStream. I need to be able to kill the process when I am done with it. Is there a way to send a SIGINT signal to this process? (as if I pressed Ctrl+C from the console).
The external process is not my code and I cannot modify it.
Are you running the external program as a
java.lang.Process? As the Process class has adestroy()method.