Whenever I type killall java -9 ,all java process is killed, even if i change the process name. So Is there an way to protect the java process being killed by 'killall java -9'
The simple solution is to run the process with a different user. Then, you (as your current user) would not have permission to kill all processes called
java, unless you were
deltik, do not have a
java process running.
Processes: 80 total, 3 running, 1 stuck, 76 sleeping, 435 threads 21:22:54 Load Avg: 1.66, 1.47, 1.40 CPU usage: 33.49% user, 2.65% sys, 63.85% idle SharedLibs: 7552K resident, 4480K data, 0B linkedit. MemRegions: 15059 total, 1858M resident, 32M private, 372M shared. PhysMem: 298M wired, 2332M active, 1289M inactive, 3918M used, 176M free. VM: 164G vsize, 1041M framework vsize, 490174(73) pageins, 7225(0) pageouts. Networks: packets: 1543452/932M in, 1286039/414M out. Disks: 103231/3309M read, 218839/2343M written. PID COMMAND %CPU TIME #TH #WQ USER 1159 java 108 02:28:38 45/2 1 somebody 1769 top 4.0 00:10.32 1/1 0 root 765 bash 0.0 00:00.00 1 0 deltik ...
So this is my output when I try
killall -9 java:
Deltik-iMac:~ deltik$ killall -9 java No matching processes belonging to you were found
I cannot kill a
java process owned by