aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-02-07 14:46:08 +0100
committerHans Bolinder <[email protected]>2013-02-07 14:49:22 +0100
commit6e5fcc26742ca7ae3bdd4249c15e87b8667609fc (patch)
tree4c4d9bf8d968cf647280dbcaaa447f8bd243ae41
parent933d896cd86a930b9ce6b601c4d8246a2bdbfcfa (diff)
downloadotp-6e5fcc26742ca7ae3bdd4249c15e87b8667609fc.tar.gz
otp-6e5fcc26742ca7ae3bdd4249c15e87b8667609fc.tar.bz2
otp-6e5fcc26742ca7ae3bdd4249c15e87b8667609fc.zip
[stdlib] Fix a bug that could cause the Erlang shell to loop
-rw-r--r--lib/stdlib/src/shell.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index 203d2a4f76..0cd408204e 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -185,7 +185,7 @@ server(StartSync) ->
%% Check if we're in user restricted mode.
RShErr =
case application:get_env(stdlib, restricted_shell) of
- {ok,RShMod} ->
+ {ok,RShMod} when is_atom(RShMod) ->
io:fwrite(<<"Restricted ">>, []),
case code:ensure_loaded(RShMod) of
{module,RShMod} ->
@@ -193,6 +193,8 @@ server(StartSync) ->
{error,What} ->
{RShMod,What}
end;
+ {ok, Term} ->
+ {Term,not_an_atom};
undefined ->
undefined
end,