~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/kernel/test/topApp2.erl

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
Tags: 1:13.b.3-dfsg-2ubuntu1
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Fixed dialyzer(1) manpage which was placed into section 3 and conflicted
  with dialyzer(3erl).
* New upstream release (it adds a new binary package erlang-erl-docgen).
* Refreshed patches, removed most of emacs.patch which is applied upstream.
* Linked run_test binary from erlang-common-test package to /usr/bin.
* Fixed VCS headers in debian/control.
* Moved from prebuilt manpages to generated from sources. This adds
  erlang-manpages binary package and xsltproc build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
 
5
%% 
 
6
%% The contents of this file are subject to the Erlang Public License,
 
7
%% Version 1.1, (the "License"); you may not use this file except in
 
8
%% compliance with the License. You should have received a copy of the
 
9
%% Erlang Public License along with this software. If not, it can be
 
10
%% retrieved online at http://www.erlang.org/.
 
11
%% 
 
12
%% Software distributed under the License is distributed on an "AS IS"
 
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
14
%% the License for the specific language governing rights and limitations
 
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
 
18
%%
 
19
-module(topApp2).
 
20
-behaviour(supervisor).
 
21
 
 
22
%% External exports
 
23
-export([start/2, stop/1, start_phase/3]).
 
24
 
 
25
%% Internal exports
 
26
-export([init/1]).
 
27
 
 
28
start(_Type, {_AppN, Low, High}) ->
 
29
    Name = list_to_atom(lists:concat([ch_sup, Low])),
 
30
    {ok, P} = supervisor:start_link({local, Name}, ch_sup,
 
31
                                    lists:seq(Low, High)),
 
32
    {ok, P, []}.
 
33
 
 
34
stop(_) -> ok.
 
35
 
 
36
init(Nos) ->
 
37
    SupFlags = {one_for_one, 12, 60},
 
38
    Chs = lists:map(fun(No) ->
 
39
                           {list_to_atom(lists:concat([ch,No])),
 
40
                            {ch, start_link, [{ch, No}]},
 
41
                            permanent, 2000, worker, [ch]}
 
42
                    end,
 
43
                    Nos),
 
44
    {ok, {SupFlags, Chs}}.
 
45
 
 
46
start_phase(Phase, _Type, _Args) ->
 
47
    (catch global:send(start_phase,{sp, Phase})),
 
48
    ok.