aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2012-03-22 14:29:55 +0100
committerRaimo Niskanen <[email protected]>2012-03-22 15:41:18 +0100
commitf67487b67bfb9ab04b01ef87bbfc39a24f604f11 (patch)
tree3029c7a42a621670cdf4834a3712bca2f9376b9d /erts/doc/src
parent5d7ed57d07118f95cf970ee655ea8eea76cbe6fd (diff)
parent1e13b92d5c6543c82219610aa1336dbdf1f4dc2d (diff)
downloadotp-f67487b67bfb9ab04b01ef87bbfc39a24f604f11.tar.gz
otp-f67487b67bfb9ab04b01ef87bbfc39a24f604f11.tar.bz2
otp-f67487b67bfb9ab04b01ef87bbfc39a24f604f11.zip
Merge branch 'maint'
Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/test/bif_SUITE.erl erts/preloaded/ebin/erlang.beam erts/preloaded/src/erlang.erl lib/hipe/cerl/erl_bif_types.erl
Diffstat (limited to 'erts/doc/src')
-rw-r--r--erts/doc/src/erlang.xml59
1 files changed, 47 insertions, 12 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 3664bdf76d..2ead6f511a 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1236,26 +1236,61 @@ true
<name name="halt" arity="0"/>
<fsummary>Halt the Erlang runtime system and indicate normal exit to the calling environment</fsummary>
<desc>
- <p>Halts the Erlang runtime system and indicates normal exit to
- the calling environment. Has no return value.</p>
+ <p>The same as
+ <seealso marker="#halt/2"><c>halt(0, [])</c></seealso>.</p>
<pre>
> <input>halt().</input>
-os_prompt%</pre>
+os_prompt% </pre>
</desc>
</func>
<func>
<name name="halt" arity="1"/>
<fsummary>Halt the Erlang runtime system</fsummary>
<desc>
- <p><c><anno>Status</anno></c> must be a non-negative integer, or a string.
- Halts the Erlang runtime system. Has no return value.
- If <c><anno>Status</anno></c> is an integer, it is returned as an exit
- status of Erlang to the calling environment.
- If <c><anno>Status</anno></c> is a string, produces an Erlang crash dump
- with <c><anno>Status</anno></c> as slogan, and then exits with a non-zero
- status code.</p>
- <p>Note that on many platforms, only the status codes 0-255 are
- supported by the operating system.</p>
+ <p>The same as
+ <seealso marker="#halt/2"><c>halt(<anno>Status</anno>, [])</c></seealso>.</p>
+ <pre>
+> <input>halt(17).</input>
+os_prompt% <input>echo $?</input>
+17
+os_prompt% </pre>
+ </desc>
+ </func>
+ <func>
+ <name>halt(Status, Options)</name>
+ <fsummary>Halt the Erlang runtime system</fsummary>
+ <desc>
+ <p><c><anno>Status</anno></c> must be a non-negative integer, a string,
+ or the atom <c>abort</c>.
+ Halts the Erlang runtime system. Has no return value.
+ Depending on <c><anno>Status</anno></c>:
+ </p>
+ <taglist>
+ <tag>integer()</tag>
+ <item>The runtime system exits with the integer value <c><anno>Status</anno></c>
+ as status code to the calling environment (operating system).
+ </item>
+ <tag>string()</tag>
+ <item>An erlang crash dump is produced with <c><anno>Status</anno></c> as slogan,
+ and then the runtime system exits with status code <c>1</c>.
+ </item>
+ <tag><c>abort</c></tag>
+ <item>
+ The runtime system aborts producing a core dump, if that is
+ enabled in the operating system.
+ </item>
+ </taglist>
+ <p>Note that on many platforms, only the status codes 0-255 are
+ supported by the operating system.
+ </p>
+ <p>For integer <c><anno>Status</anno></c> the Erlang runtime system closes all ports
+ and allows async threads to finish their operations before exiting.
+ To exit without such flushing use
+ <c><anno>Option</anno></c> as <c>{flush,false}</c>.
+ </p>
+ <p>For statuses <c>string()</c> and <c>abort</c> the <c>flush</c>
+ option is ignored and flushing is <em>not</em> done.
+ </p>
</desc>
</func>
<func>