aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/release_handler_1.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-11-30 11:51:00 +0100
committerPeter Andersson <[email protected]>2011-11-30 11:51:00 +0100
commitb243b515c69a2585829ec65307ae5d0aff9ac2c6 (patch)
tree7d69a9ec25fbab8a63741cc59f663b7b1c025280 /lib/sasl/src/release_handler_1.erl
parent3cce9003a2ebd9aa581ae248c30dd0cc64568397 (diff)
parent81f08713ff0ea3e49c2432e489a74f49ab6ebc42 (diff)
downloadotp-b243b515c69a2585829ec65307ae5d0aff9ac2c6.tar.gz
otp-b243b515c69a2585829ec65307ae5d0aff9ac2c6.tar.bz2
otp-b243b515c69a2585829ec65307ae5d0aff9ac2c6.zip
Merge remote branch 'upstream/master' into peppe/common_test/css_fixes
Diffstat (limited to 'lib/sasl/src/release_handler_1.erl')
-rw-r--r--lib/sasl/src/release_handler_1.erl15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl
index 37275eff45..93d12cf609 100644
--- a/lib/sasl/src/release_handler_1.erl
+++ b/lib/sasl/src/release_handler_1.erl
@@ -505,15 +505,20 @@ resume(Pids) ->
change_code(Pids, Mod, Vsn, Extra, Timeout) ->
Fun = fun(Pid) ->
- case Timeout of
- default ->
- ok = sys:change_code(Pid, Mod, Vsn, Extra);
- _Else ->
- ok = sys:change_code(Pid, Mod, Vsn, Extra, Timeout)
+ case sys_change_code(Pid, Mod, Vsn, Extra, Timeout) of
+ ok ->
+ ok;
+ {error,Reason} ->
+ throw({code_change_failed,Pid,Mod,Vsn,Reason})
end
end,
lists:foreach(Fun, Pids).
+sys_change_code(Pid, Mod, Vsn, Extra, default) ->
+ sys:change_code(Pid, Mod, Vsn, Extra);
+sys_change_code(Pid, Mod, Vsn, Extra, Timeout) ->
+ sys:change_code(Pid, Mod, Vsn, Extra, Timeout).
+
stop(Mod, Procs) ->
lists:zf(fun({undefined, _Name, _Pid, _Mods}) ->
false;