mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Stop applications before killing extra processes
This means that applications get a chance to shut down themselves, before rebar will start killing their processes. This avoids ERROR REPORTS from application supervisors.
This commit is contained in:
parent
b10224be62
commit
896e8505b2
1 changed files with 4 additions and 3 deletions
|
@ -484,9 +484,6 @@ reset_after_eunit({OldProcesses, WasAlive, OldAppEnvs, _OldACs}) ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
||||||
Processes = erlang:processes(),
|
|
||||||
_ = kill_extras(Processes -- OldProcesses),
|
|
||||||
|
|
||||||
OldApps = [App || {App, _} <- OldAppEnvs],
|
OldApps = [App || {App, _} <- OldAppEnvs],
|
||||||
Apps = get_app_names(),
|
Apps = get_app_names(),
|
||||||
_ = [begin
|
_ = [begin
|
||||||
|
@ -499,6 +496,10 @@ reset_after_eunit({OldProcesses, WasAlive, OldAppEnvs, _OldACs}) ->
|
||||||
{K, _V} <- application:get_all_env(App)],
|
{K, _V} <- application:get_all_env(App)],
|
||||||
|
|
||||||
reconstruct_app_env_vars(Apps),
|
reconstruct_app_env_vars(Apps),
|
||||||
|
|
||||||
|
Processes = erlang:processes(),
|
||||||
|
_ = kill_extras(Processes -- OldProcesses),
|
||||||
|
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
kill_extras(Pids) ->
|
kill_extras(Pids) ->
|
||||||
|
|
Loading…
Reference in a new issue