summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:35:00 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:35:00 +0100
commitb9e23db24068075d26f536e3a1b286b8a4edcc57 (patch)
tree849a01a0648292f95e190040ce8c4e40aa3581a2 /src
parent41458dc3f488c441dd2dab32cb465edf2f2e277f (diff)
downloadrabbitmq-server-git-b9e23db24068075d26f536e3a1b286b8a4edcc57.tar.gz
restore docs (but reformatted)
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_misc.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index 31512b67e6..5eb24327be 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -396,10 +396,16 @@ report_coverage_percentage(File, Cov, NotCov, Mod) ->
confirm_to_sender(Pid, MsgSeqNos) ->
gen_server2:cast(Pid, {confirm, MsgSeqNos, self()}).
+%% @doc Halts the emulator after printing out an error message
+%% io-formatted with the supplied arguments. The exit status of the
+%% beam process will be set to 1.
quit(Fmt, Args) ->
io:format("ERROR: " ++ Fmt ++ "~n", Args),
quit(1).
+%% @doc Halts the emulator returning the given status code to the os.
+%% On Windows this function will block indefinitely so as to give the io
+%% subsystem time to flush stdout completely.
quit(Status) ->
case os:type() of
{unix, _} -> halt(Status);