From 8f7f2ba4ec4a94a414cd33ab5ad9486784e6f674 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 6 Dec 2011 18:14:54 +0100 Subject: Ensure test-proc is dead before stopping node --- erts/emulator/test/scheduler_SUITE.erl | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'erts/emulator/test') diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl index 05553c2028..c7ec3cbe41 100644 --- a/erts/emulator/test/scheduler_SUITE.erl +++ b/erts/emulator/test/scheduler_SUITE.erl @@ -519,13 +519,19 @@ bound_loop(NS, N, M, Sched) -> bindings(Node, BindType) -> Parent = self(), Ref = make_ref(), - spawn_link(Node, - fun () -> - enable_internal_state(), - Res = (catch erts_debug:get_internal_state( - {fake_scheduler_bindings, BindType})), - Parent ! {Ref, Res} - end), + Pid = spawn_link(Node, + fun () -> + enable_internal_state(), + Res = (catch erts_debug:get_internal_state( + {fake_scheduler_bindings, + BindType})), + Parent ! {Ref, Res} + end), + Mon = erlang:monitor(process, Pid), + receive + {'DOWN', Mon, _, _, _} -> + ok + end, receive {Ref, Res} -> ?t:format("~p: ~p~n", [BindType, Res]), -- cgit v1.2.3