0

I have some Java code running on server in infinite loop. Currently I am using "kill -9 process_id" to stop process. But kill command forcefully stop Java process without cleaning resource.

I want to implement signal handler in Java just like C++ so that I can clean all resource and gracefully stop Java process.

Can anyone please suggest me the right way to do this?

Thorbjørn Ravn Andersen
  • 71,889
  • 31
  • 184
  • 335
visingh
  • 233
  • 2
  • 13

0 Answers0