Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'egil/fix-heart-unregister' into maint

* egil/fix-heart-unregister:
  kernel: Heart port needs to be unregistered
  • Loading branch information...
commit 6b9369ea8357b8365cea461f3a73e9f9a0d1b56f 2 parents 7c4021a + e458e7b
@psyeugenic psyeugenic authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/kernel/src/heart.erl
View
4 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),
Please sign in to comment.
Something went wrong with that request. Please try again.