diff options
author | Fredrik Gustafsson <[email protected]> | 2013-04-04 14:38:10 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-04-04 14:38:10 +0200 |
commit | 44a2884a7df320596039b8c8563bf73f9eb5aa6b (patch) | |
tree | 35dddbd28cdf221753b1c96a804fa0487c023ed6 /lib/stdlib/src/gen_server.erl | |
parent | a5af6ab951919b68142bfebe8245c874ef31585a (diff) | |
parent | e72043e3519cb14aabf461849eba959b97e07410 (diff) | |
download | otp-44a2884a7df320596039b8c8563bf73f9eb5aa6b.tar.gz otp-44a2884a7df320596039b8c8563bf73f9eb5aa6b.tar.bz2 otp-44a2884a7df320596039b8c8563bf73f9eb5aa6b.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/src/gen_server.erl')
-rw-r--r-- | lib/stdlib/src/gen_server.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl index 04308a51b7..9c4b95acf6 100644 --- a/lib/stdlib/src/gen_server.erl +++ b/lib/stdlib/src/gen_server.erl @@ -372,6 +372,13 @@ wake_hib(Parent, Name, State, Mod, Debug) -> decode_msg(Msg, Parent, Name, State, Mod, Time, Debug, Hib) -> case Msg of + {system, From, get_state} -> + sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug, + {State, [Name, State, Mod, Time]}, Hib); + {system, From, {replace_state, StateFun}} -> + NState = try StateFun(State) catch _:_ -> State end, + sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug, + {NState, [Name, NState, Mod, Time]}, Hib); {system, From, Req} -> sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug, [Name, State, Mod, Time], Hib); |