I needed a procedure that made a process crash with random intervals so I
wrote someting like this:
-module(crash).
-export([crash/0]).
crash() ->
case random:uniform(100) of
X when X < 10 ->
true = false;
X ->
%% io:format("value ~w~n", [X]),
ok
end.
works fine until it actually crashes, then the random function does not
generate a new value, it's stuck in the value that caused the crash. Could
be a feature, could be somthing else.
Johan
--
Johan Montelius
KTH ICT/ECS
There are 10 types of people in the world - those who understand binary
and those who don't.