From 6e5fcc26742ca7ae3bdd4249c15e87b8667609fc Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 7 Feb 2013 14:46:08 +0100 Subject: [stdlib] Fix a bug that could cause the Erlang shell to loop --- lib/stdlib/src/shell.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/stdlib') 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, -- cgit v1.2.3