summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-10-31 10:29:06 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-10-31 10:29:06 +0000
commitf21d5c370557dac41288b672ff9b5921db5fbb93 (patch)
treec7eff556ac4331fc68281281e8dbd2cc4f1d7d24
parente4420200ce9904fb78debd918c5cda4c0c677656 (diff)
downloadrabbitmq-server-git-f21d5c370557dac41288b672ff9b5921db5fbb93.tar.gz
fix case + cosmetic
-rw-r--r--src/rabbit_control.erl22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index c8f3ed00d9..11638ee981 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -1,3 +1,4 @@
+
%% The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
@@ -393,15 +394,18 @@ wait_for_process_death(Pid) ->
read_pid_file(PidFile, Wait) ->
case {file:read_file(PidFile), Wait} of
- {{ok, Bin}, _} -> S = string:strip(binary_to_list(Bin), right, $\n),
- try list_to_integer(S)
- catch error:badarg ->
- exit({error, {garbage_in_pid_file, S}})
- end,
- S;
- {{error, enoent}, true} -> timer:sleep(?EXTERNAL_CHECK_INTERVAL),
- read_pid_file(PidFile, Wait);
- {error, _} = E -> exit({error, {could_not_read_pid, E}})
+ {{ok, Bin}, _} ->
+ S = string:strip(binary_to_list(Bin), right, $\n),
+ try list_to_integer(S)
+ catch error:badarg ->
+ exit({error, {garbage_in_pid_file, S}})
+ end,
+ S;
+ {{error, enoent}, true} ->
+ timer:sleep(?EXTERNAL_CHECK_INTERVAL),
+ read_pid_file(PidFile, Wait);
+ {{error, _} = E, _} ->
+ exit({error, {could_not_read_pid, E}})
end.
% Test using some OS clunkiness since we shouldn't trust