diff options
author | Erlang/OTP <[email protected]> | 2010-05-28 09:39:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-05-28 09:39:40 +0000 |
commit | 56f23b4aca7c8bfcceeb0095536926ddb1a8102c (patch) | |
tree | 776e4600afde665884bbd6642a48bba1fbbce27e /lib/wx/src | |
parent | 3bfea34b08b4593dbda83677fe2611c4e440fd9a (diff) | |
parent | dab11bf07c66e1f119cc5d6198c8e90c5a02219e (diff) | |
download | otp-56f23b4aca7c8bfcceeb0095536926ddb1a8102c.tar.gz otp-56f23b4aca7c8bfcceeb0095536926ddb1a8102c.tar.bz2 otp-56f23b4aca7c8bfcceeb0095536926ddb1a8102c.zip |
Merge branch 'sv/format_status-name-handling' into dev
* sv/format_status-name-handling:
handle {global, term()} names in format_status/2
OTP-8656 sv/format_status-name-handling
Calling sys:get_status() for processes that have globally registered names
that were not atoms would cause a crash. Corrected. (Thanks to Steve
Vinoski.)
Diffstat (limited to 'lib/wx/src')
-rw-r--r-- | lib/wx/src/wx_object.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/wx/src/wx_object.erl b/lib/wx/src/wx_object.erl index 71041ff558..bfd38960dd 100644 --- a/lib/wx/src/wx_object.erl +++ b/lib/wx/src/wx_object.erl @@ -605,12 +605,15 @@ dbg_opts(Name, Opts) -> %%----------------------------------------------------------------- format_status(Opt, StatusData) -> [PDict, SysState, Parent, Debug, [Name, State, Mod, _Time]] = StatusData, - NameTag = if is_pid(Name) -> - pid_to_list(Name); - is_atom(Name) -> - Name - end, - Header = lists:concat(["Status for generic server ", NameTag]), + StatusHdr = "Status for wx object ", + Header = if + is_pid(Name) -> + lists:concat([StatusHdr, pid_to_list(Name)]); + is_atom(Name); is_list(Name) -> + lists:concat([StatusHdr, Name]); + true -> + {StatusHdr, Name} + end, Log = sys:get_debug(log, Debug, []), Specfic = case erlang:function_exported(Mod, format_status, 2) of |