File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ main() ->
6
6
Mod = get_main_module (),
7
7
erlang :display ({" Starting" , Mod }),
8
8
% erlang:display(code:all_loaded()),
9
- erlang :display (length (processes ())),
10
- % length(registered()).)
9
+ % erlang:display(length(processes())),
10
+ % length(registered())).
11
11
R = Mod :main (),
12
12
erlang :display ({" Done" , R }),
13
13
erlang :halt ().
@@ -16,14 +16,19 @@ module_name(Str) ->
16
16
case catch list_to_atom (Str ) of
17
17
{'EXIT' , _ } ->
18
18
erlang :display (" Bad module name: " ++ Str ),
19
- erlang :halt ();
19
+ erlang :halt (1 );
20
+
21
+ ? MODULE ->
22
+ erlang :display (" Attempting to run boot module. Try another module" ),
23
+ erlang :halt (1 );
24
+
20
25
Mod -> Mod
21
26
end .
22
27
23
28
get_main_module () ->
24
29
case init :get_argument (load ) of
25
30
{ok , [[Arg ]]} -> module_name (Arg );
26
31
_ ->
27
- erlang :display (" Missing: -load Mod" ),
28
- erlang :halt ()
32
+ erlang :display (" Missing command line argument : -load Mod" ),
33
+ erlang :halt (1 )
29
34
end .
You can’t perform that action at this time.
0 commit comments