aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-07-05 10:15:06 +0200
committerSiri Hansen <[email protected]>2016-07-08 10:13:08 +0200
commit7bc18a66e4603a39b765fb0607b90adb28cd3752 (patch)
tree00f796a319582491b87306c0de70ef242134a7d1 /lib
parentdeb4a4689a65d88a44648138ac160f640a36aa78 (diff)
downloadotp-7bc18a66e4603a39b765fb0607b90adb28cd3752.tar.gz
otp-7bc18a66e4603a39b765fb0607b90adb28cd3752.tar.bz2
otp-7bc18a66e4603a39b765fb0607b90adb28cd3752.zip
[sasl test] Catch erlang:port_close/1
After starting a node with open_port({spawn_executable,...},...), the resulting port is closed both automatically and by the calling rh_test_lib:cmd/3. To avoid 'badarg' in the case when the automatic is faster, the call to erlang:port_close/1 is now catched.
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl/test/rh_test_lib.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl
index 11935496d8..dacd8b6b9f 100644
--- a/lib/sasl/test/rh_test_lib.erl
+++ b/lib/sasl/test/rh_test_lib.erl
@@ -18,7 +18,7 @@ cmd(Cmd,Args,Env) ->
case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of
Port when is_port(Port) ->
unlink(Port),
- erlang:port_close(Port),
+ catch erlang:port_close(Port), % migth already be closed, so catching
ok;
Error ->
Error