summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-06-15 09:05:11 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-06-15 09:05:11 -0400
commit1994a7177c60c54f38fdbac045554821b14ac048 (patch)
treef5e939bfda9084f8deaf4bcd83aa900144f9c189 /src
parent1972f1f85a25e15ccf13a6400dcb48183ae63624 (diff)
OTP apps show proper output
Whenever the old shell got killed and an app got loaded prior, the whole thing would silently drop output as the old 'user' process was replaced while application master processes would keep the old one's pid in their internal state. To work around this limitation, make sure the apps are booted only after the shell is replaced so that only the new `user` pid is used.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_shell.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl
index e407ff2..84ad723 100644
--- a/src/rebar_prv_shell.erl
+++ b/src/rebar_prv_shell.erl
@@ -85,8 +85,11 @@ format_error(Reason) ->
shell(State) ->
setup_name(State),
setup_paths(State),
- maybe_boot_apps(State),
setup_shell(),
+ %% apps must be started after the change in shell because otherwise
+ %% their application masters never gets the new group leader (held in
+ %% their internal state)
+ maybe_boot_apps(State),
rebar_agent:start_link(State),
%% this call never returns (until user quits shell)
timer:sleep(infinity).