aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2010-11-10 20:00:52 +0200
committerHenrik Nord <[email protected]>2011-10-07 17:17:06 +0200
commit9bb4ba879b613fc1986ac37c027a16884f3814fe (patch)
treec54127e6a99b5fb721e5b6af20b6bf6a72afa7cd /lib/stdlib/src/supervisor.erl
parent570594df20b0780333c2b6ba4ff7cfd6a0b02395 (diff)
downloadotp-9bb4ba879b613fc1986ac37c027a16884f3814fe.tar.gz
otp-9bb4ba879b613fc1986ac37c027a16884f3814fe.tar.bz2
otp-9bb4ba879b613fc1986ac37c027a16884f3814fe.zip
Add '-callback' attributes in stdlib's behaviours
Replace the behaviour_info(callbacks) export in stdlib's behaviours with -callback' attributes for all the callbacks.
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 36cc7f4f4b..9da0d52f8c 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -27,8 +27,6 @@
which_children/1, count_children/1,
check_childspecs/1]).
--export([behaviour_info/1]).
-
%% Internal exports
-export([init/1, handle_call/3, handle_info/2, terminate/2, code_change/3]).
-export([handle_cast/2]).
@@ -90,14 +88,12 @@
-define(is_simple(State), State#state.strategy =:= simple_one_for_one).
-%%--------------------------------------------------------------------------
-
--spec behaviour_info(atom()) -> 'undefined' | [{atom(), arity()}].
-
-behaviour_info(callbacks) ->
- [{init,1}];
-behaviour_info(_Other) ->
- undefined.
+-callback init(Args :: term()) ->
+ {ok, {{RestartStrategy :: strategy(),
+ MaxR :: non_neg_integer(),
+ MaxT :: non_neg_integer()},
+ [ChildSpec :: child_spec()]}}
+ | ignore.
%%% ---------------------------------------------------
%%% This is a general process supervisor built upon gen_server.erl.