This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Killing a Java Process  RSS feed

sharidasa hari
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I start a new process in Java using Process.exec.
If I wanted to a send ^c (contol C ) to the process via Java program, how do I go about doing it?
I have a peice of code where when a button is pressed, the process is supposed to abort. To do this I have the following code..
If the AWT event queue thread is actually calling this function, technically is it supposed to wait for the Sub process to complete before it sets the state.
There are situations where the proc.getOutputStream() continues to read data when the proc.destroy is issued and after the state is set..
So, I am trying to kill the process by issuing a control C..
your help is really appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!