Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Runtime.addShutdownHook() method can be used to customize Runtime.exit() to perform additional actions at program termination.
This method takes a single Thread, which must be initialized but unstarted. Then, when the JVM begins to shut down, the thread will be run. Since Because the JVM usually has a fixed time to shut down, these threads should not be long-running and should not attempt user interaction.

...

The CERT C Secure Coding Standard

ERR04-C. Choose an appropriate termination strategy

The CERT C++ Secure Coding Standard

ERR04-CPP. Choose an appropriate termination strategy

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="72451c47bf28f216-5508b3f3-4c5d4796-af6a8c56-19dcabfedae8862e5cc065ba"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

http://www.aitcnet.org/isai/]

"Termination Strategy [REU]"

]]></ac:plain-text-body></ac:structured-macro>

MITRE CWE

CWE-705, "Incorrect Control Flow Scoping"

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c7f231d2f8a86cfa-27501025-499348f7-86a698b4-aebc3affc157da388fd9ad51"><ac:plain-text-body><![CDATA[

[[API 06

AA. Bibliography#API 06]]

[Class Runtime

http://download.oracle.com/javase/6/docs/api/java/lang/Runtime.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="547ee95c678dfc95-65ffc512-47654cec-bb858f64-6cada82b2a795bc0e7eb1512"><ac:plain-text-body><![CDATA[

[[ISO/IEC TR 24772:2010

AA. Bibliography#ISO/IEC TR 24772-2010]]

Section 6.46, "Termination Strategy [REU]"

]]></ac:plain-text-body></ac:structured-macro>

...