Przeglądaj źródła

Fix race condition in rebar_prv_shell boot

Fixes https://github.com/erlang/rebar3/issues/2242
Filters out dead processes that can't return process info.
pull/2243/head
Fred Hebert 5 lat temu
rodzic
commit
47334999d1
1 zmienionych plików z 2 dodań i 1 usunięć
  1. +2
    -1
      src/rebar_prv_shell.erl

+ 2
- 1
src/rebar_prv_shell.erl Wyświetl plik

@ -222,7 +222,8 @@ rewrite_leaders(OldUser, NewUser) ->
%% liveness check.
_ = [catch erlang:group_leader(NewUser, Pid)
|| Pid <- erlang:processes(),
proplists:get_value(group_leader, erlang:process_info(Pid)) == OldUser,
[_|_] = Info <- [erlang:process_info(Pid)],
proplists:get_value(group_leader, Info) == OldUser,
is_process_alive(Pid)],
%% Application masters have the same problem, but they hold the old group
%% leader in their state and hold on to it. Re-point the processes whose

Ładowanie…
Anuluj
Zapisz