diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-10-31 10:29:06 +0000 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-10-31 10:29:06 +0000 |
commit | 202a08505ca8569d84dd590f2bf6a9c0e23cc815 (patch) | |
tree | c7eff556ac4331fc68281281e8dbd2cc4f1d7d24 /src/rabbit_control.erl | |
parent | 2eefc5dd02e8ea502395c957b254ee86d104f77d (diff) | |
download | rabbitmq-server-202a08505ca8569d84dd590f2bf6a9c0e23cc815.tar.gz |
fix case + cosmetic
Diffstat (limited to 'src/rabbit_control.erl')
-rw-r--r-- | src/rabbit_control.erl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index c8f3ed00..11638ee9 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 |