diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-06-05 13:38:38 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-06-05 13:38:38 +0100 |
commit | 1e67f7c9053025200a230857463a75677e0a5075 (patch) | |
tree | 8635804771f1c2ed5c77992bf1a98536ef83a4ab | |
parent | 85019edb003baf95cd6b8263d3ad1e5bcd123018 (diff) | |
download | rabbitmq-server-1e67f7c9053025200a230857463a75677e0a5075.tar.gz |
rename rabbit_control_main:system/1 to run_ps, which more accurately describes what it does
-rw-r--r-- | src/rabbit_control_main.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 95dcb212..82bee785 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -511,7 +511,7 @@ read_pid_file(PidFile, Wait) -> % rpc:call(os, getpid, []) at this point process_up(Pid) -> with_os([{unix, fun () -> - system("ps -p " ++ Pid) =:= 0 + run_ps(Pid) =:= 0 end}, {win32, fun () -> Res = os:cmd("tasklist /nh /fi \"pid eq " ++ @@ -529,9 +529,8 @@ with_os(Handlers) -> Handler -> Handler() end. -% Like system(3) -system(Cmd) -> - Port = erlang:open_port({spawn, Cmd}, +run_ps(Pid) -> + Port = erlang:open_port({spawn, "ps -p " ++ Pid}, [exit_status,{line, 16384}, use_stdio, stderr_to_stdout]), exit_loop(Port). |