Today modify ota upgrade process, you need to kill off some of the processes to release resources, he intended to use killall, it can be found that does not kill, need to bring a -9 argument to force quit. Summarized as follows:
1. killall psName // Full Name: kill processes by name, send SIGTERM
killall -9 psName // send SIGKILL, the program terminates immediately
2. kill pid // kill will default to send a termination signal (15) to make the process exits normally
kill -9 pid // send SIGKILL let the process be terminated immediately
killall killall and kill difference is the name of the process can be used directly, without having to know the pid, very convenient.
kill command is used to send a signal, commonly used are:
HUP 1 终端断线
INT 2 中断(同 Ctrl + C)
QUIT 3 退出(同 Ctrl + \)
KILL 9 强制终止
TERM 15 终止
CONT 18 继续(与STOP相反, fg/bg命令)
STOP 19 暂停(同 Ctrl + Z)