Examine Running Processes and Stop the Supervisors
We examine the which_children function of the supervisor and learn to stop them.
We'll cover the following...
The which_children function
We can get more information about running child processes by using which_children/1. This function returns a list of tuples. Each tuple has four elements:
-
It contains the child process’s ID, which could be
:undefinedfor dynamically started processes. -
It contains the child process’s PID or the
:restartingvalue when the process is in the middle of a restart. -
It contains the process’s type, either
:workeror:supervisor. -
It also contains the module implementation, which ...
Ask