mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
stderr_to_stdout boyeeeee
This commit is contained in:
parent
1dfd8c2115
commit
fce50f3993
@ -348,13 +348,13 @@ cmd(Cmd, Opts) ->
|
||||
%% once per second, as to not create the impression that nothing is happening.
|
||||
-spec stream_cmd(string()) -> {integer(), string()}.
|
||||
stream_cmd(Cmd) ->
|
||||
Port = open_port({spawn, binary_to_list(iolist_to_binary(Cmd))}, [stream, exit_status]),
|
||||
Port = open_port({spawn, binary_to_list(iolist_to_binary(Cmd))}, [stream, stderr_to_stdout, exit_status]),
|
||||
stream_cmd_loop(Port, "", "", now()).
|
||||
|
||||
%% @doc same as rt:stream_cmd/1, but with options, like open_port/2
|
||||
-spec stream_cmd(string(), string()) -> {integer(), string()}.
|
||||
stream_cmd(Cmd, Opts) ->
|
||||
Port = open_port({spawn, binary_to_list(iolist_to_binary(Cmd))}, [stream, exit_status] ++ Opts),
|
||||
Port = open_port({spawn, binary_to_list(iolist_to_binary(Cmd))}, [stream, stderr_to_stdout, exit_status] ++ Opts),
|
||||
stream_cmd_loop(Port, "", "", now()).
|
||||
|
||||
stream_cmd_loop(Port, Buffer, NewLineBuffer, Time={_MegaSecs, Secs, _MicroSecs}) ->
|
||||
|
Loading…
Reference in New Issue
Block a user