ides_march (ides v0.2.0)
View SourceKill graph analysis and restart logic for ides.
Summary
Functions
Return the PIDs of siblings that would be killed or restarted
if TargetPid dies.
Return all PIDs that could cause TargetPid to be killed.
Return the kill graph with each entry tagged by its kill mechanism
Return link information for the given process.
Return monitor information for the given process.
Return whether a terminated child Pid would be restarted by
its supervisor.
Types
Functions
Return the PIDs of siblings that would be killed or restarted
if TargetPid dies.
Depends on the parent supervisor's strategy:
one_for_one:TargetPidonlyone_for_all: all siblingsrest_for_one:TargetPidand all siblings after itsimple_one_for_one:TargetPidonly
Return all PIDs that could cause TargetPid to be killed.
This is the set of ancestors unioned with siblings that trigger cascade restarts under the parent supervisor's strategy:
one_for_one/simple_one_for_one: only ancestors (no sibling killers)one_for_all: all siblings are killersrest_for_one: siblings at positions before the target are killers
-spec kill_graph_detail(TargetPid :: pid()) -> {ok, [ides_family:kill_source()]} | {error, term()}.
Return the kill graph with each entry tagged by its kill mechanism:
ancestor— supervisor ancestorsibling— sibling via supervisor strategylink— linked process (relevant if target doesn't trap exits)monitor— monitored process (relevant if target doesn't handle DOWN)
-spec link_info(Pid :: pid()) -> {ok, ides_family:link_info()} | {error, term()}.
Return link information for the given process.
Reports which processes are linked to Pid and whether
Pid traps exits. Linked processes are potential killers
if traps_exits is false.
-spec monitor_info(Pid :: pid()) -> {ok, ides_family:monitor_info()} | {error, term()}.
Return monitor information for the given process.
Reports which processes Pid is monitoring and which
processes are monitoring Pid. Monitored processes are
potential killers if Pid doesn't handle DOWN messages.
-spec should_restart(Pid :: pid(), Reason :: exit_reason()) -> boolean().
Return whether a terminated child Pid would be restarted by
its supervisor.
Rules:
permanent: always restartedtransient: restarted only onabnormalexittemporary: never restarted