Simple_one_for_one can only be terminated if appointed SHUTDOWN strategy to brutal_kill?

Sorry I've got wrong result.

To make it clear:

  1. brutal_kill strategy kill child process immediately.
  2. The terminate method will be invoked if the simple_one_for_one's shutdown strategy is an integer timeout. The child must declare process_flag(trap_exit, true) in its init callback.

FYI, Manual on Erlang doc:

If the gen_server is part of a supervision tree and is ordered by its supervisor to terminate, this function will be called with Reason=shutdown if the following conditions apply:

the gen_server has been set to trap exit signals, and the shutdown strategy as defined in the supervisor's child specification is an integer timeout value, not brutal_kill.

Tags:

Erlang

Otp