anchor.diff:  -include("safeio.hrl").
   
   -define(CHECK_TIMEOUT_MILLIS, 1000).
  +-define(CHECK_ALIVE_INTERVAL, 30000).
   
   -type from() :: {pid(), term()}.
   
  
positive.code: %%------------------------------------------------------------------------------
  %% @private
  %%------------------------------------------------------------------------------
  -spec fail_all(safeio:ioerror(), #state{}) -> #state{}.
  fail_all(E, State = #state{ pending = Ps }) ->
      lists:map(
        fun({_,P}) ->
  
negative.code: %%------------------------------------------------------------------------------
  %% @private
  %%------------------------------------------------------------------------------
  start_check() -> erlang:start_timer(?CHECK_ALIVE_INTERVAL, self(), check).
  
  %%------------------------------------------------------------------------------
  %% @private
  %%------------------------------------------------------------------------------
  start_port() ->
      PortOpts = [{packet, 2}, binary, exit_status, nouse_stdio],
      open_port({spawn, get_cmd()}, PortOpts).
  