3

The other day I experienced a halt in my python application with sigabrt, but I knew that the init should send a sigkill signal. I'm curious what's the difference between them, if any? Can someone give me some resources to read more about this?

Rohola Zandie
  • 143
  • 1
  • 4

1 Answers1

2

There is the explanation from:

www.quora.com/What-is-the-difference-between-SIGABRT-and-SIGKILL-in-Linux

SIGKILL and SIGABRT are two type of signals that are sent to process to terminate it.

SIGKILL is equivalent of "kill -9" and is used to kill zombie processes, processes that are already dead and waiting for their parent processes to reap them. SIGABRT is equivalent of "kill -6" and is used to terminate/abort running processes.

SIGKILL signal cannot be caught or ignored and the receiving process cannot perform any clean-up upon receiving this signal. SIGABRT signal can be caught, but it cannot be blocked.


So in other words, your program can react on SIGABRT correctly and launch gracefull exit.

Jaroslav Kucera
  • 1,435
  • 10
  • 16
  • Can you provide me with a more trustable source? – Rohola Zandie Sep 15 '17 at 01:37
  • superuser.com/questions/594508/whats-the-difference-between-sigkill-and-sigstop – Jaroslav Kucera Sep 15 '17 at 06:15
  • Part of the above answer is wrong, SIGKILL is not used to kill zombie processes, zombie processes are already "dead" i.e. they aren't using any system resources, they are just present with enough meta data for the parent process in some future time to reap them. The only real way to "kill" a zombie process is to kill the parent process. Furthermore, very often there aren't many differences between different signals, its just that some signals can be dealt with in programs, however these days people don't deal with all signals received, it can become quite cumbersome. – rishi Aug 22 '22 at 03:16
  • SIGKILL is a sort of failsafe, it is a sure way to terminate a process. – rishi Aug 22 '22 at 03:16