From e2577531278c5dde283c4ab7be766d081c363ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 31 Mar 2016 10:34:15 +0200 Subject: Return callback module in supervisor format_status The previous implementation of supervisor:get_callback_module/1 used sys:get_status/1 to get the supervisor inner state and retrieve the callback module. Such implementation forbids any other supervisor implementation that has an internal state different than the #state{} record in supervisor.erl. This patch allows supervisors to return the callback module as part of the sys:get_status/1 data, no longer coupling the callback module implementation with the inner #state{} record. Notice we have kept the clause matching the previous sys:get_status/1 reply for backwards compatibility purposes. --- lib/observer/src/observer_procinfo.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/observer/src/observer_procinfo.erl') diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl index 871ef603db..2f07b73578 100644 --- a/lib/observer/src/observer_procinfo.erl +++ b/lib/observer/src/observer_procinfo.erl @@ -317,7 +317,7 @@ fetch_state_info2(Pid, M) -> of {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg, - [Header,{data, First},{data, Second}]]} -> + [Header,{data, First},{data, Second}|_]]} -> [{"Behaviour", B}, Header] ++ First ++ Second; {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg, -- cgit v1.2.3