Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d4eafd6dd4
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (47 sloc) 1.997 kb
%%%-------------------------------------------------------------------
%%% File : medici_port_sup.erl
%%% Author : Jim McCoy <>
%%% Description :
%%%
%%% Created : 6 May 2009 by Jim McCoy <>
%%%-------------------------------------------------------------------
-module(medici_port_sup).
-behaviour(supervisor).
%% API
-export([start_link/0, start_link/1]).
%% Supervisor callbacks
-export([init/1]).
%%====================================================================
%% API functions
%%====================================================================
%%--------------------------------------------------------------------
%% Function: start_link() -> {ok,Pid} | ignore | {error,Error}
%% Description: Starts the supervisor
%%--------------------------------------------------------------------
start_link() ->
start_link([]).
start_link(StartArgs) ->
supervisor:start_link(?MODULE, StartArgs).
%%====================================================================
%% Supervisor callbacks
%%====================================================================
%%--------------------------------------------------------------------
%% Func: init(Args) -> {ok, {SupFlags, [ChildSpec]}} |
%% ignore |
%% {error, Reason}
%% Description: Whenever a supervisor is started using
%% supervisor:start_link/[2,3], this function is called by the new process
%% to find out about restart strategy, maximum restart frequency and child
%% specifications.
%%--------------------------------------------------------------------
init(StartArgs) ->
PortManager = [{medici_port_srv,
{medici_port_srv, start_link, StartArgs},
permanent,
2000,
worker,
[medici_port_srv]}],
{ok, {{one_for_one,10, 5}, PortManager}}.
%%====================================================================
%% Internal functions
%%====================================================================
Jump to Line
Something went wrong with that request. Please try again.