From 7bc18a66e4603a39b765fb0607b90adb28cd3752 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 5 Jul 2016 10:15:06 +0200 Subject: [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. --- lib/sasl/test/rh_test_lib.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') 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 -- cgit v1.2.3