Skip to content

Commit

Permalink
start at least one async thread in async thread pool
Browse files Browse the repository at this point in the history
fixes an issue when shell is terminated with an error "Bus error: 10",
on attempt to run rebar shell with verbose logging
  • Loading branch information
velimir committed May 8, 2018
1 parent 59a99a7 commit c5ae9f3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion priv/templates/escript_rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[{{name}}]}.
{escript_main_app, {{name}}}.
{escript_name, {{name}}}.
{escript_emu_args, "%%! +sbtu +A0\n"}.
{escript_emu_args, "%%! +sbtu +A1\n"}.

%% Profiles
{profiles, [{test,
Expand Down
3 changes: 1 addition & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]}.

{escript_name, rebar3}.
{escript_emu_args, "%%! +sbtu +A0\n"}.
{escript_emu_args, "%%! +sbtu +A1\n"}.
%% escript_incl_extra is for internal rebar-private use only.
%% Do not use outside rebar. Config interface is not stable.
{escript_incl_extra, [{"relx/priv/templates/*", "_build/default/lib/"},
Expand Down Expand Up @@ -78,4 +78,3 @@
{add, relx, [{erl_opts, [no_debug_info]}]}]}
]}
]}.

2 changes: 1 addition & 1 deletion src/rebar3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
%% ====================================================================

%% @doc For running with:
%% erl +sbtu +A0 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@"
%% erl +sbtu +A1 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@"
-spec main() -> no_return().
main() ->
List = init:get_plain_arguments(),
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_prv_local_install.erl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ format_error(Reason) ->
bin_contents(OutputDir) ->
<<"#!/usr/bin/env sh
erl -pz ", (rebar_utils:to_binary(OutputDir))/binary,"/*/ebin +sbtu +A0 -noshell -boot start_clean -s rebar3 main $REBAR3_ERL_ARGS -extra \"$@\"
erl -pz ", (rebar_utils:to_binary(OutputDir))/binary,"/*/ebin +sbtu +A1 -noshell -boot start_clean -s rebar3 main $REBAR3_ERL_ARGS -extra \"$@\"
">>.

extract_escript(State, ScriptPath) ->
Expand Down

0 comments on commit c5ae9f3

Please sign in to comment.