summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-06-06 12:32:59 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-06-06 12:32:59 +0100
commit23c54ea3ecf8506def32b45bf0f2ef921b90d58e (patch)
treecd6599e0b035a941eccd5f105582ebf7e4d2150d
parent2a28ed8851ed26ac5d949ef4972f0fa78efd30ba (diff)
downloadrabbitmq-server-23c54ea3ecf8506def32b45bf0f2ef921b90d58e.tar.gz
Revert to the 2.8.2 version until bug 24982 is resolved
-rw-r--r--src/rabbit_control_main.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl
index 29408006..4724555b 100644
--- a/src/rabbit_control_main.erl
+++ b/src/rabbit_control_main.erl
@@ -490,12 +490,8 @@ wait_for_process_death(Pid) ->
read_pid_file(PidFile, Wait) ->
case {file:read_file(PidFile), Wait} of
{{ok, Bin}, _} ->
- S = binary_to_list(Bin),
- Spid = case string:words(S) > 1 of
- true -> string:sub_word(S, 1);
- false -> string:strip(binary_to_list(Bin), right, $\n)
- end,
- try list_to_integer(Spid)
+ S = string:strip(binary_to_list(Bin), right, $\n),
+ try list_to_integer(S)
catch error:badarg ->
exit({error, {garbage_in_pid_file, PidFile}})
end,