Does Pkill just end the service.. or does it actually restart it as well? I have used the command in this way Pkill -9 java to restart java... but what happens if I do not append java with the -9? I'm working on a live phoneswitch running Redhat and figured asking would be better than just doing to find out. Thanks a lot.
pkill kills a process
the process you killed probably has a daemon which restarts itself once stopped *or killled*
cheers
anywe
So pkill itself isn't doing the restarting, the daemon is probably bringing the process back up once it detects that it is not running.
Quote:Pkill -9 java
You may want to refrain from the "-9" option: just
pkill java will do the trick.
It may take longer for the java processes to stop, but they'll have a chance to shut down cleanly (and allow the OS to reclaim used memory, file handlers, etc)