aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test/runner.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-23 15:05:34 +0100
committerSverker Eriksson <[email protected]>2017-11-23 15:05:34 +0100
commit8ed0d75c186d9da24bd6cfb85732487b17a3b054 (patch)
treef458c4ef6fc080fe9859834cabe3e49d40da9908 /lib/erl_interface/test/runner.erl
parenta5aaba7c9a316327940d0b861dd300d59aa99209 (diff)
downloadotp-8ed0d75c186d9da24bd6cfb85732487b17a3b054.tar.gz
otp-8ed0d75c186d9da24bd6cfb85732487b17a3b054.tar.bz2
otp-8ed0d75c186d9da24bd6cfb85732487b17a3b054.zip
erts: Fix erlang:monitor toward c-nodes
by suppressing DOP_MONITOR_P, DOP_MONITOR_P_EXIT and DOP_DEMONITOR_P if not supported by the remote node. In 17e198d6ee60f7dec9abfed272cf4226aea44535 I changed the behavior of erlang:monitor to not raise badarg for c-nodes but instead create a monitor to only supervise the connection. But I forgot to prevent DOP_MONITOR_P and friends from being sent to the node that does not expect them. Note: We test both DFLAG_DIST_MONITOR and DFLAG_DIST_MONITOR_NAME for the node to support process monitoring. This is because erl_interface is buggy as it sets DFLAG_DIST_MONITOR without really supporting it. ToDo: Should erl_interface stop setting DFLAG_DIST_MONITOR or should we change the meaning of these flags?
Diffstat (limited to 'lib/erl_interface/test/runner.erl')
-rw-r--r--lib/erl_interface/test/runner.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/erl_interface/test/runner.erl b/lib/erl_interface/test/runner.erl
index 1084eec2a3..cbdeb3c8a9 100644
--- a/lib/erl_interface/test/runner.erl
+++ b/lib/erl_interface/test/runner.erl
@@ -67,7 +67,12 @@ start({Prog, Tc}) when is_list(Prog), is_integer(Tc) ->
finish(Port) when is_port(Port) ->
send_eot(Port),
- recv_eot(Port).
+ ok = recv_eot(Port),
+ 0 = receive
+ {Port,{exit_status,Status}} ->
+ Status
+ end,
+ ok.
%% Sends an Erlang term to a C program.