diff options
author | David Wragg <david@rabbitmq.com> | 2010-09-07 20:02:29 +0100 |
---|---|---|
committer | David Wragg <david@rabbitmq.com> | 2010-09-07 20:02:29 +0100 |
commit | 89a4ef423df2dfd6fc7206aa8bc1e0963d63dd08 (patch) | |
tree | e84d1ae694feeead1532ae976314b1652f79eb00 | |
parent | eac39cf28e194c55ae1b57793af3e21108244883 (diff) | |
download | rabbitmq-server-89a4ef423df2dfd6fc7206aa8bc1e0963d63dd08.tar.gz |
Use a more portable command to probe for pids
The ps options used were linux-specific. "kill -0" works on BSDs and
OS X too.
-rw-r--r-- | src/rabbit_multi.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl index c7a5a600..9b6ed4b1 100644 --- a/src/rabbit_multi.erl +++ b/src/rabbit_multi.erl @@ -310,8 +310,7 @@ kill_wait(Pid, TimeLeft, Forceful) -> is_dead(Pid) -> PidS = integer_to_list(Pid), with_os([{unix, fun () -> - Res = os:cmd("ps --no-headers --pid " ++ PidS), - Res == "" + os:cmd("kill -0 " ++ PidS) /= "" end}, {win32, fun () -> Res = os:cmd("tasklist /nh /fi \"pid eq " ++ |