[erlang-questions] release handler dynamic modules registered names
Paul Mineiro
paul-trapexit@REDACTED
Tue Mar 25 23:43:54 CET 2008
hi.
we recently ran into a hot code upgrade problem (mysteriously failing with
{ 'EXIT', noproc }) that could be traced to release_handler_1:get_procs/2
for a supervisor containing a dynamic child that was not registered. we
were thinking about sending the attached patch to erlang-bugs (which fixed
our problem) but then we saw
http://forum.trapexit.org/mailinglists/viewtopic.php?p=30364&sid=41799b00139c693722ea1d3ba0b65379
which didn't seem to get any replies.
so, is this a bug, or a feature?
-- p
Optimism is an essential ingredient of innovation. How else can the
individual favor change over security?
-- Robert Noyce
-------------- next part --------------
--- /usr/lib/erlang/lib/sasl-2.1.5.1/src/release_handler_1.erl 2007-08-05 08:48:53.000000000 -0700
+++ release_handler_1.erl 2008-03-25 15:41:07.000000000 -0700
@@ -505,7 +505,7 @@
application:which_applications())).
get_procs([{Name, Pid, worker, dynamic} | T], Sup) when is_pid(Pid) ->
- Mods = get_dynamic_mods(Name),
+ Mods = get_dynamic_mods(Pid),
[{Sup, Name, Pid, Mods} | get_procs(T, Sup)];
get_procs([{Name, Pid, worker, Mods} | T], Sup) when is_pid(Pid), is_list(Mods) ->
[{Sup, Name, Pid, Mods} | get_procs(T, Sup)];
More information about the erlang-questions
mailing list