diff options
author | Hans Bolinder <[email protected]> | 2011-05-06 15:11:15 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-05-12 15:18:41 +0200 |
commit | 76ca320fd37cecdcf225ddcc094bc72a607b0453 (patch) | |
tree | 15c6c9cac782836be6deed2316b04f2cea74e7b3 /lib/stdlib/src/supervisor_bridge.erl | |
parent | 68fe6a14539b82250373ef114d6576e74e1b8f2e (diff) | |
download | otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.tar.gz otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.tar.bz2 otp-76ca320fd37cecdcf225ddcc094bc72a607b0453.zip |
Types and specifications have been modified and added
Diffstat (limited to 'lib/stdlib/src/supervisor_bridge.erl')
-rw-r--r-- | lib/stdlib/src/supervisor_bridge.erl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/stdlib/src/supervisor_bridge.erl b/lib/stdlib/src/supervisor_bridge.erl index 3d2bd2c9a5..555cb5a66f 100644 --- a/lib/stdlib/src/supervisor_bridge.erl +++ b/lib/stdlib/src/supervisor_bridge.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -49,9 +49,25 @@ behaviour_info(_Other) -> %%%----------------------------------------------------------------- -record(state, {mod, pid, child_state, name}). +-spec start_link(Module, Args) -> Result when + Module :: module(), + Args :: term(), + Result :: {ok, Pid} | ignore | {error, Error}, + Error :: {already_started, Pid} | term(), + Pid :: pid(). + start_link(Mod, StartArgs) -> gen_server:start_link(supervisor_bridge, [Mod, StartArgs, self], []). +-spec start_link(SupBridgeName, Module, Args) -> Result when + SupBridgeName :: {local, Name} | {global, Name}, + Name :: atom(), + Module :: module(), + Args :: term(), + Result :: {ok, Pid} | ignore | {error, Error}, + Error :: {already_started, Pid} | term(), + Pid :: pid(). + start_link(Name, Mod, StartArgs) -> gen_server:start_link(Name, supervisor_bridge, [Mod, StartArgs, Name], []). |