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
  • 73,784
  • 33
  • 194
  • 347
visingh
  • 233
  • 3
  • 17

0 Answers0