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="5000a9478119a65c-327d9218-44674076-bc568abd-d9f8a526202eeb2cfd0e4be5"><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="c034a5300249dadd-f990908a-44c744bb-a2edbef5-13dd97e3e3d203e7d7979c67"><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="01838a5aa37b8bfd-f3ee18d0-40d14ce6-99fc9c31-21b7c3f4617077dd357d2dcd"><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>

...