question about supervisors
Wed Jul 27 13:24:21 CEST 2005
Gaspar Chilingarov wrote:
> Hi all!
> It's supposed if I get PID of process and it's supervisor,
> I can make assumption that even the process dies, supervisor will
> survive in any case and do not exit - so even if worker PID is invalid I
> always can ask supervisor for PID of new worker process?
The behaviour of the supervisor depends of its setting. For example,
strategies can define what to do when a process crash (Should the
supervisor only restart this process ? all its supervised process, etc).
In this "strategy", you can define the maximum restart frequency. It
means that if the supervised processed maximum restart level in a given
time has been reached, the supervised process will exit.
So basically, the supervisor survives but, in some case, it might decide
You should pay attention to your supervisors setting and the
organisation of the processus in the supervision tree. This is important
to define the overall behaviour of your application in case of errors.
For more information:
More information about the erlang-questions