This topic i choose for reading purpose because if you need to know reason then you must know the application and its signal in the Operation System.
First the signals described in the original POSIX.1 standard.
|or death of controlling process|
|SIGINT||2||Term||Interrupt from keyboard|
|SIGQUIT||3||Core||Quit from keyboard|
|SIGABRT||6||Core||Abort signal from abort|
|SIGFPE||8||Core||Floating point exception|
|SIGSEGV||11||Core||Invalid memory reference|
|SIGPIPE||13||Term||Broken pipe: write to pipe with no readers|
|SIGALRM||14||Term||Timer signal from alarm|
|SIGUSR1||30,10,16||Term||User-defined signal 1|
|SIGUSR2||31,12,17||Term||User-defined signal 2|
|SIGCHLD||20,17,18||Ign||Child stopped or terminated|
|SIGCONT||19,18,25||Continue if stopped|
|SIGTSTP||18,20,24||Stop||Stop typed at tty|
|SIGTTIN||21,21,26||Stop||tty input for background process|
|SIGTTOU||22,22,27||Stop||tty output for background process|
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Difference between kill and pkill command
kill -signal pid
You have to know the pid before kill the process.
pkill -signal process
You can kill process using process name or pid.
You can get pid using pgrep command.
Difference betwen kill and kill -9
The kill and pkill command without any signal passes the signal 15. It terminates the process the normal way.
Some of the processes can ignore the signal 15 and won't terminate. So in those case we need to use signal 9 option. We can use signal 9 with kill and pkill.
kill -9 pid
pkill -9 process