aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_event.erl
diff options
context:
space:
mode:
authorGeoff Cant <[email protected]>2010-06-12 16:49:54 -0700
committerRaimo Niskanen <[email protected]>2010-07-07 16:34:09 +0200
commit95ed86fc9893460751c5141ff872bdc13814a273 (patch)
tree1722de5f58c95432ca4de75e590c9c90aa4a8334 /lib/stdlib/src/gen_event.erl
parentc752a4ea65c744ac283cc277717f8defa15ae610 (diff)
downloadotp-95ed86fc9893460751c5141ff872bdc13814a273.tar.gz
otp-95ed86fc9893460751c5141ff872bdc13814a273.tar.bz2
otp-95ed86fc9893460751c5141ff872bdc13814a273.zip
Fix format_status bug for unregistered gen_event processes
Port the gen_fsm code for format_status to gen_event in order to prevent a lists:concat([...,pid()]) crash when calling sys:get_status/1 on an unregistered gen_event process. Refactor format_status header code from gen_* behaviours to module gen. Extend the format_status tests in gen_event_SUITE to cover format_status bugs with anonymous gen_event processes.
Diffstat (limited to 'lib/stdlib/src/gen_event.erl')
-rw-r--r--lib/stdlib/src/gen_event.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl
index b1e9e3a02f..b00910771f 100644
--- a/lib/stdlib/src/gen_event.erl
+++ b/lib/stdlib/src/gen_event.erl
@@ -724,7 +724,8 @@ get_modules(MSL) ->
%%-----------------------------------------------------------------
format_status(Opt, StatusData) ->
[PDict, SysState, Parent, _Debug, [ServerName, MSL, _Hib]] = StatusData,
- Header = lists:concat(["Status for event handler ", ServerName]),
+ Header = gen:format_status_header("Status for event handler",
+ ServerName),
FmtMSL = [case erlang:function_exported(Mod, format_status, 2) of
true ->
Args = [PDict, State],