[erlang-questions] child processes order of termination

Martin Dimitrov <>
Wed May 4 10:58:29 CEST 2011


Thanks a lot. So I did it again - ask before carefully read. Sorry.

Best regards,

Martin

On 5/4/2011 11:54 AM, Ahmed Omar wrote:
> It's done in reversed start order. When Module2 is a supervisor, his
> children will be stopped first.
> http://www.erlang.org/doc/design_principles/sup_princ.html#id69917
>
> On Wed, May 4, 2011 at 10:42 AM, Martin Dimitrov <>wrote:
>
>> Hi,
>>
>> On application stop what is the order of termination of the supervised
>> processes?
>>
>> For example, the supervisor's children are defined as follows:
>>
>> {ok, {{one_for_all, 5, 1},
>>     [
>>        {module1, {module1, start_link, []}, permanent, 2000, worker,
>> [module1]},
>>        {module2, {module2, start_link, []}, permanent, infinity,
>> supervisor, [module2]},
>>        {module3, {module3, start_link, []}, permanent, 2000, worker,
>> [module3]}
>>    ]
>> }}.
>>
>> In what order they will be terminated? Is it determined?
>>
>> The module2 is also a supervisor, will its children be terminated before
>> proceeding with the top one?
>>
>> Thanks,
>>
>> Martin
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>




More information about the erlang-questions mailing list