Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 54 lines (44 sloc) 1.849 kb
c7cf8d8 fix whitespaces + licence header
Nicolas Niclausse authored
1 %%% This program is free software; you can redistribute it and/or modify
2 %%% it under the terms of the GNU General Public License as published by
3 %%% the Free Software Foundation; either version 2 of the License, or
4 %%% (at your option) any later version.
5 %%%
6 %%% This program is distributed in the hope that it will be useful,
7 %%% but WITHOUT ANY WARRANTY; without even the implied warranty of
8 %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 %%% GNU General Public License for more details.
10 %%%
11 %%% You should have received a copy of the GNU General Public License
12 %%% along with this program; if not, write to the Free Software
13 %%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
14 %%%
15 %%% In addition, as a special exception, you have the permission to
16 %%% link the code of this program with any library released under
17 %%% the EPL license and distribute linked combinations including
18 %%% the two.
19 %%%
20 %%% ts_user_server_sup.erl
21 %%% @author Pablo Polvorin
22 %%% @doc
23 %%% created on 2008-09-09
24
d556325 update vhost patch against trunk (TSUN-82)
Nicolas Niclausse authored
25 -module(ts_user_server_sup).
26
27 -export([start_link/0,init/1,start_user_server/1,all_children/0]).
28
29 -behaviour(supervisor).
30
31 start_link() ->
32 {ok,Pid} = supervisor:start_link({global,?MODULE},?MODULE,[]),
33 start_default_user_server(),
34 %default user_server is always started
35 {ok,Pid}.
36
37 init([]) ->
38 SupFlags = {simple_one_for_one,1,1 },
0232848 fix merge of vhost patch (TSUN-82)
Nicolas Niclausse authored
39 ChildSpec = [
40 {ts_user_server,{ts_user_server, start, []},
41 temporary,2000,worker,[ts_user_server]}
42 ],
d556325 update vhost patch against trunk (TSUN-82)
Nicolas Niclausse authored
43 {ok, {SupFlags, ChildSpec}}.
44
45 start_user_server(Name) ->
0232848 fix merge of vhost patch (TSUN-82)
Nicolas Niclausse authored
46 supervisor:start_child({global,?MODULE},[Name]).
d556325 update vhost patch against trunk (TSUN-82)
Nicolas Niclausse authored
47
48 start_default_user_server() ->
0232848 fix merge of vhost patch (TSUN-82)
Nicolas Niclausse authored
49 supervisor:start_child({global,?MODULE},[]).
50
d556325 update vhost patch against trunk (TSUN-82)
Nicolas Niclausse authored
51
52 all_children() ->
53 [ Pid ||{_,Pid,_,_} <- supervisor:which_children({global,?MODULE})].
Something went wrong with that request. Please try again.