From e6ea3b07e25b09481b010558f8bfdfb57dcbb85e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
Date: Mon, 15 Oct 2012 16:22:47 +0200
Subject: doc: Document ERL_CRASH_DUMP_SECONDS behaviour
* heart reboot behaviour
* erl_crash.dump file write behaviour
---
erts/doc/src/erl.xml | 31 +++++++++++++++++++++++++++++++
lib/kernel/doc/src/heart.xml | 33 +++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 2dea477d99..f931445a3e 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -1040,6 +1040,37 @@
the emulator will be allowed to spend writing a crash dump. When
the given number of seconds have elapsed, the emulator will be
terminated by a SIGALRM signal.
+
+
If the environment variable is not set or it is set to zero seconds, ,
+ the runtime system will not even attempt to write the crash dump file. It will just terminate.
+
+
If the environment variable is set to negative valie, e.g. ,
+ the runtime system will wait indefinitely for the crash dump file to be written.
+
+
This environment variable is used in conjuction with
+ heart if heart is running:
+
+
+
+
+ Suppresses the writing a crash dump file entirely,
+ thus rebooting the runtime system immediately.
+ This is the same as not setting the environment variable.
+
+
+
+
Setting the environment variable to a negative value will cause the
+ termination of the runtime system to wait until the crash dump file
+ has been completly written.
+
+
+
+
+ Will wait for S seconds to complete the crash dump file and
+ then terminate the runtime system.
+
+
+
diff --git a/lib/kernel/doc/src/heart.xml b/lib/kernel/doc/src/heart.xml
index 26d1e27822..2826d3d00a 100644
--- a/lib/kernel/doc/src/heart.xml
+++ b/lib/kernel/doc/src/heart.xml
@@ -71,6 +71,39 @@
timeout and try to reboot the system. This can happen, for
example, if the system clock is adjusted automatically by use of
NTP (Network Time Protocol).
+
+
If a crash occurs, an will not be written
+ unless the environment variable is set.
+
+
+
+% erl -heart -env ERL_CRASH_DUMP_SECONDS 10 ...
+
+ Furthermore, has the following behaviour on
+ heart:
+
+
+
+
+ Suppresses the writing a crash dump file entirely,
+ thus rebooting the runtime system immediately.
+ This is the same as not setting the environment variable.
+
+
+
+
Setting the environment variable to a negative value will not reboot
+ the runtime system until the crash dump file has been completly written.
+
+
+
+
+ Heart will wait for S seconds to let the crash dump file be written.
+ After S seconds heart will reboot the runtime system regardless of
+ the crash dump file has been written or not.
+
+
+
+
In the following descriptions, all function fails with reason
badarg if heart is not started.