aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-03-19 14:32:02 +0100
committerSiri Hansen <[email protected]>2013-04-03 12:24:07 +0200
commit0841aaf3a09b4ddcf5ea52a6c781f5e11cf85227 (patch)
treef938e7a2bc396db6fbca75f2a6b42e279542169a
parentb83c42d381b3b8aaf8f5a564b1abbeb48a17a01c (diff)
downloadotp-0841aaf3a09b4ddcf5ea52a6c781f5e11cf85227.tar.gz
otp-0841aaf3a09b4ddcf5ea52a6c781f5e11cf85227.tar.bz2
otp-0841aaf3a09b4ddcf5ea52a6c781f5e11cf85227.zip
[sasl] Quote path to program run with open_port({spawn,...
This is to allow space in the path.
-rw-r--r--lib/sasl/src/erlsrv.erl6
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl
index 086dc7c651..58d43cda34 100644
--- a/lib/sasl/src/erlsrv.erl
+++ b/lib/sasl/src/erlsrv.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@ current_version() ->
run_erlsrv(Command) ->
run_erlsrv(current_version(),Command).
run_erlsrv(EVer, Command) ->
- case catch(open_port({spawn, erlsrv(EVer) ++ " " ++ Command},
+ case catch(open_port({spawn, "\"" ++ erlsrv(EVer) ++ "\" " ++ Command},
[{line,1000}, in, eof])) of
{'EXIT',{Reason,_}} ->
{port_error, Reason};
@@ -53,7 +53,7 @@ run_erlsrv(EVer, Command) ->
end.
run_erlsrv_interactive(EVer, Commands) ->
- case catch(open_port({spawn, erlsrv(EVer) ++ " readargs"},
+ case catch(open_port({spawn, "\""++ erlsrv(EVer) ++ "\" readargs"},
[{line,1000}, eof])) of
{'EXIT',{Reason,_}} ->
{port_error, Reason};
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index 97ba70c9bd..501220d3c6 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -2676,7 +2676,7 @@ rpc_inst(Node,Func,Args) ->
delete_all_services() ->
ErlSrv = erlsrv:erlsrv(erlang:system_info(version)),
- [_|Serviceinfo] = string:tokens(os:cmd(ErlSrv ++ " list"),"\n"),
+ [_|Serviceinfo] = string:tokens(os:cmd("\"" ++ ErlSrv ++ "\" list"),"\n"),
Services =
[lists:takewhile(fun($\t) -> false; (_) -> true end,S)
|| S <- Serviceinfo],