2

Why does killall (sometimes?) need to be applied twice? Here's an example where a "double" killall is needed to end the process.

When and why does a process needed to be killed "twice"? What happens under the bonnet?

1 Answers1

2

I am going to state a application-specific possibility.

When you use killall program, a SIGTERM (signal 15) is sent to the program. The usual response to SIGTERM is that the program would exit gracefully.

Now as the SIGTERM is catchable, a program can have a signal handler for SIGTERM that would do some task upon receiving the first SIGTERM (first killall) and return to a state where the second SIGTERM would just terminate it (default action). This is highly dependent on the developer of the program of course and not a general case.

heemayl
  • 91,753