Преглед на файлове

Merge pull request #2243 from ferd/fix-leader-rewrite-race

Fix race condition in rebar_prv_shell boot
pull/2245/head
Fred Hebert преди 5 години
committed by GitHub
родител
ревизия
e3e8eca001
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. +2
    -1
      src/rebar_prv_shell.erl

+ 2
- 1
src/rebar_prv_shell.erl Целия файл

@ -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

Зареждане…
Отказ
Запис