~rdoering/ubuntu/lucid/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/kernel/src/kernel.erl

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
* 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:
99
99
            permanent, 2000, worker, 
100
100
            [file, file_server, file_io_server, prim_file]},
101
101
    StdError = {standard_error,
102
 
            {standard_error, start_link, []},
103
 
            temporary, 2000, supervisor, [user_sup]},
 
102
                {standard_error, start_link, []},
 
103
                temporary, 2000, supervisor, [user_sup]},
104
104
    User = {user,
105
105
            {user_sup, start, []},
106
106
            temporary, 2000, supervisor, [user_sup]},
107
107
    
108
108
    case init:get_argument(mode) of
109
109
        {ok, [["minimal"]]} ->
110
 
 
111
110
            SafeSupervisor = {kernel_safe_sup,
112
111
                              {supervisor, start_link,
113
112
                               [{local, kernel_safe_sup}, ?MODULE, safe]},
114
113
                              permanent, infinity, supervisor, [?MODULE]},
115
 
 
116
114
            {ok, {SupFlags,
117
115
                  [File, Code, StdError, User,
118
116
                   Config, SafeSupervisor]}};
134
132
            SafeSupervisor = {kernel_safe_sup,
135
133
                              {supervisor, start_link,
136
134
                               [{local, kernel_safe_sup}, ?MODULE, safe]},
137
 
                              permanent, infinity, supervisor, [?MODULE]},          
138
 
 
 
135
                              permanent, infinity, supervisor, [?MODULE]},
139
136
            {ok, {SupFlags,
140
137
                  [Rpc, Global, InetDb | DistAC] ++ 
141
138
                  [NetSup, Glo_grp, File, Code, 
142
139
                   StdError, User, Config, SafeSupervisor] ++ Timer}}
143
140
    end;
144
 
 
145
141
init(safe) ->
146
142
    SupFlags = {one_for_one, 4, 3600},
147
143
    Boot = start_boot_server(),
212
208
            []
213
209
    end.
214
210
 
215
 
 
216
 
 
217
 
 
218
 
 
219
211
%%-----------------------------------------------------------------
220
212
%% The change of the distributed parameter is taken care of here
221
213
%%-----------------------------------------------------------------
247
239
%% Check if distribution is changed in someway.
248
240
%%-----------------------------------------------------------------
249
241
is_dist_changed(Changed, New, Removed) ->
250
 
    C = case lists:keysearch(distributed, 1, Changed) of
 
242
    C = case lists:keyfind(distributed, 1, Changed) of
251
243
            false ->
252
244
                false;
253
 
            {value, {distributed, NewDistC}} ->
 
245
            {distributed, NewDistC} ->
254
246
                NewDistC
255
247
        end,
256
 
    N = case lists:keysearch(distributed, 1, New) of
 
248
    N = case lists:keyfind(distributed, 1, New) of
257
249
            false ->
258
250
                false;
259
 
            {value, {distributed, NewDistN}} ->
 
251
            {distributed, NewDistN} ->
260
252
                NewDistN
261
253
        end,
262
254
    R = lists:member(distributed, Removed),
263
255
    {C, N, R}.
264
256
 
265
 
 
266
 
 
267
257
%%-----------------------------------------------------------------
268
258
%% The change of the global_groups parameter is taken care of here
269
259
%%-----------------------------------------------------------------
270
260
do_global_groups_change(Changed, New, Removed) ->
271
 
    %% check if the global_groups parameter is changed. 
272
 
    
 
261
    %% check if the global_groups parameter is changed.
273
262
    case is_gg_changed(Changed, New, Removed) of
274
263
        %%{changed, new, removed}
275
264
        {false, false, false} ->
287
276
%% Check if global_groups is changed in someway.
288
277
%%-----------------------------------------------------------------
289
278
is_gg_changed(Changed, New, Removed) ->
290
 
    C = case lists:keysearch(global_groups, 1, Changed) of
 
279
    C = case lists:keyfind(global_groups, 1, Changed) of
291
280
            false ->
292
281
                false;
293
 
            {value, {global_groups, NewDistC}} ->
 
282
            {global_groups, NewDistC} ->
294
283
                NewDistC
295
284
        end,
296
 
    N = case lists:keysearch(global_groups, 1, New) of
 
285
    N = case lists:keyfind(global_groups, 1, New) of
297
286
            false ->
298
287
                false;
299
 
            {value, {global_groups, NewDistN}} ->
 
288
            {global_groups, NewDistN} ->
300
289
                NewDistN
301
290
        end,
302
291
    R = lists:member(global_groups, Removed),
303
292
    {C, N, R}.
304
 
 
305
 
 
306