anchor.diff:  	    {ok, Cmd}
       end.
   
  +%% validate system by performing a check before the heartbeat
  +%% return 'ok' if everything is alright.
  +%% Terminate if with reason if something is a miss.
  +%% It is fine to timeout in the callback, in fact that is the intention
  +%% if something goes wront -> no heartbeat.
  +
  +check_callback(Callback) ->
  +    case Callback of
  +        undefined -> ok;
  +        {M,F} ->
  +            erlang:apply(M,F,[])
  +    end.
  +
   %% Sends shutdown command to the port.
   send_shutdown(Port) -> Port ! {self(), {command, [?SHUT_DOWN]}}.
   
  
positive.code: 	{'EXIT', Port, badsig} ->  % we can ignore badsig-messages!
  	    loop(Parent, S);
  	{'EXIT', Port, _Reason} ->
  	    exit({port_terminated, {heart, loop, [Parent, S]}});
  	_ -> 
  	    loop(Parent, S)
      after
  
negative.code: init(Starter, Parent) ->
      process_flag(trap_exit, true),
      process_flag(priority, max),
      register(?MODULE, self()),
      case catch start_portprogram() of
  	{ok, Port} ->
  	    Starter ! {ok, self()},
  