code: private void removeShutdownHook() {
      if (added && !running) {
        boolean removed = Runtime.getRuntime().removeShutdownHook(
            destroyProcessThread);
        if (!removed) {
          log.error("Could not remove shutdown hook");
        }
        /*
         * start the hook thread, a unstarted thread may not be eligible for
         * garbage collection Cf.: http://developer.java.sun.com/developer/
         * bugParade/bugs/4533087.html
         */
  
        destroyProcessThread.setShouldDestroy(false);
        destroyProcessThread.start();
        // this should return quickly, since it basically is a NO-OP.
        try {
          destroyProcessThread.join(20000);
        }
        catch (InterruptedException ie) {
          // the thread didn't die in time
          // it should not kill any processes unexpectedly
        }
        destroyProcessThread = null;
        added = false;
      }
    }
docs: Removes this <code>ProcessDestroyer</code> as a shutdown hook, uses
  reflection to ensure pre-JDK 1.3 compatibility