JDK-4401395 : JPDA: Allow more graceful shutdown of debuggee version for VirtualMachine.exit()
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2001-01-03
  • Updated: 2021-09-22
  • Resolved: 2016-11-03
Related Reports
Relates :  
Description

Name: tb29552			Date: 01/03/2001


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


The description for JPDA's com.sun.jdi.VirtualMachine.exit(int) method
indicates that when this method is called to stop a debuggee (commonly used to
implement the Stop feature of a debugger) that the debuggee is stopped abruptly
such that "Threads running in the mirrored VM are abruptly terminated. A thread
death exception is not thrown and finally blocks are not run."

This is fine, however we propose that another exit() method be provide that
will more gracefully shutdown the debuggee such that the debuggee's runtime
  hooks (if any) added by calling java.lang.Runtime.addShutdownHook() gets called
before the debuggee is terminated. This would be useful when one is debugging a
server process that needs to clean up resources in its shutdown hook.

(Review ID: 114476) 
======================================================================

Comments
This is not on our list of current priorities, if this changes please re-open this issue.
03-11-2016

WORK AROUND Name: tb29552 Date: 01/03/2001 One can of course let the debuggee normally terminate ======================================================================
11-06-2004