aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-11-26 09:41:03 +0100
committerBjörn-Egil Dahlberg <[email protected]>2012-11-26 09:41:03 +0100
commit6b9369ea8357b8365cea461f3a73e9f9a0d1b56f (patch)
tree730e15c9dad0f3301726ce3d153313bfede11995 /lib/kernel/src
parent7c4021a7555112affc7c37dd72f418ccc87ca647 (diff)
parente458e7b1d341c25b77bfccd833c3c53e10631b98 (diff)
downloadotp-6b9369ea8357b8365cea461f3a73e9f9a0d1b56f.tar.gz
otp-6b9369ea8357b8365cea461f3a73e9f9a0d1b56f.tar.bz2
otp-6b9369ea8357b8365cea461f3a73e9f9a0d1b56f.zip
Merge branch 'egil/fix-heart-unregister' into maint
* egil/fix-heart-unregister: kernel: Heart port needs to be unregistered
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/heart.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/src/heart.erl b/lib/kernel/src/heart.erl
index de287bfa43..87cb9d7f51 100644
--- a/lib/kernel/src/heart.erl
+++ b/lib/kernel/src/heart.erl
@@ -46,6 +46,7 @@
-define(TIMEOUT, 5000).
-define(CYCLE_TIMEOUT, 10000).
+-define(HEART_PORT_NAME, heart_port).
%%---------------------------------------------------------------------
@@ -132,7 +133,7 @@ start_portprogram() ->
case wait_ack(Port) of
ok ->
%% register port so the vm can find it if need be
- register(heart_port, Port),
+ register(?HEART_PORT_NAME, Port),
{ok, Port};
{error, Reason} ->
report_problem({{port_problem, Reason},
@@ -228,6 +229,7 @@ no_reboot_shutdown(Port) ->
end.
do_cycle_port_program(Caller, Parent, Port, Cmd) ->
+ unregister(?HEART_PORT_NAME),
case catch start_portprogram() of
{ok, NewPort} ->
send_shutdown(Port),