-1

when I do a killall java there is no response...However the next time I press enter I get a response.

Is this normal? Its ruining my cron job as it doesnt mail the killall output.

Using Centos 6.

DD.
  • 3,114
  • 11
  • 35
  • 50
  • Java is quite touchy, in my experience. It does not like to die right away, but instead will finish up whatever it's doing before exiting gracefully. – Joel E Salas Feb 07 '12 at 00:24
  • What do you mean by "there is no response"? Do you mean your `killall` hangs? Or returns without any output? Or do you mean it appears to work normally but the process doesn't die? Or what? – David Schwartz Feb 07 '12 at 00:32

1 Answers1

0

A killall, by default, is a polite request for the process to shut down. It may take its time, it may ignore it, it may fail to do it. A common pattern is to send a regular killall, wait a few seconds to see if the process has terminated, send another if not, wait a few more seconds, and then switch to more aggressive termination methods if needed.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84