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 | c4cc0f3cc0f6689274ff8b6a26cab8bbb47ca05b (patch) | |
| tree | 8635804771f1c2ed5c77992bf1a98536ef83a4ab | |
| parent | d95a4d529eb46501bc4699f074acf689aad291a5 (diff) | |
| download | rabbitmq-server-git-c4cc0f3cc0f6689274ff8b6a26cab8bbb47ca05b.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 95dcb212cd..82bee78583 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). |
