Skip to content

Commit ffc2b93

Browse files
author
Luca Favatella
committed
Restore non-zero exit code introduced in 26be832 and lost in 13a1709
I checked that init:stop/1 was present in OTP R13B03. Also rename function in a hopefully more meaningful way following change in 13a1709.
1 parent abb718f commit ffc2b93

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/basho_bench.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
-define(FAIL_MSG(Str, Args), ?ERROR(Str, Args), basho_bench_app:halt_or_kill()).
2+
-define(FAIL_MSG(Str, Args), ?ERROR(Str, Args), basho_bench_app:stop_or_kill()).
33
-define(STD_ERR(Str, Args), io:format(standard_error, Str, Args)).
44

55
-define(CONSOLE(Str, Args), lager:info(Str, Args)).

src/basho_bench_app.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
-export([start/0,
2828
stop/0,
2929
is_running/0,
30-
halt_or_kill/0]).
30+
stop_or_kill/0]).
3131

3232
%% Application callbacks
3333
-export([start/2, stop/1]).
@@ -64,14 +64,14 @@ stop() ->
6464
is_running() ->
6565
application:get_env(basho_bench_app, is_running) == {ok, true}.
6666

67-
halt_or_kill() ->
67+
stop_or_kill() ->
6868
%% If running standalone, halt and kill node. Otherwise, just
6969
%% kill top supervisor.
7070
case application:get_env(basho_bench,app_run_mode) of
7171
{ok, included} ->
7272
exit(whereis(basho_bench_sup),kill);
7373
_ ->
74-
init:stop()
74+
init:stop(1)
7575
end.
7676

7777
%% ===================================================================

0 commit comments

Comments
 (0)