aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compile_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-08-06 11:54:04 +0200
committerBjörn Gustavsson <[email protected]>2012-08-06 12:06:22 +0200
commitc595aff5bd41a5d392145212606c87e40779e142 (patch)
tree2cdda7c84a0b138643d7586828b41b8593fb85c2 /lib/compiler/test/compile_SUITE.erl
parent85a5f71087785c4eada6a4101ffeef6a15f5c409 (diff)
downloadotp-c595aff5bd41a5d392145212606c87e40779e142.tar.gz
otp-c595aff5bd41a5d392145212606c87e40779e142.tar.bz2
otp-c595aff5bd41a5d392145212606c87e40779e142.zip
compiler: Eliminate EXIT messages from the temporary compiler process
If a process trap exits, calling the compiler would leave an EXIT message in the message queue of the calling process because the compiler spawns a temporary work process. Eliminate the EXIT process by monitoring the temporary process instead of linking to it. Reported-by: Jeremy Heater
Diffstat (limited to 'lib/compiler/test/compile_SUITE.erl')
-rw-r--r--lib/compiler/test/compile_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 9dbfb5883b..da53a6ba9c 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -76,6 +76,9 @@ app_test(Config) when is_list(Config) ->
file_1(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:minutes(5)),
+
+ process_flag(trap_exit, true),
+
?line {Simple, Target} = files(Config, "file_1"),
?line {ok, Cwd} = file:get_cwd(),
?line ok = file:set_cwd(filename:dirname(Target)),
@@ -102,6 +105,15 @@ file_1(Config) when is_list(Config) ->
%% Cleanup.
?line ok = file:delete(Target),
?line ok = file:del_dir(filename:dirname(Target)),
+
+ %% There should not be any messages in the messages.
+ receive
+ Any ->
+ ?t:fail({unexpected,Any})
+ after 10 ->
+ ok
+ end,
+
?line test_server:timetrap_cancel(Dog),
ok.