bodewig     2003/10/14 06:55:13

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        ProcessDestroyer.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.11.2.1  +8 -3      
ant/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
  
  Index: ProcessDestroyer.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- ProcessDestroyer.java     24 Jul 2003 13:29:37 -0000      1.11
  +++ ProcessDestroyer.java     14 Oct 2003 13:55:13 -0000      1.11.2.1
  @@ -116,8 +116,10 @@
               removeShutdownHookMethod =
                   Runtime.class.getMethod("removeShutdownHook", paramTypes);
               // wait to add shutdown hook as needed
  -        } catch (Exception e) {
  +        } catch (NoSuchMethodException e) {
               // it just won't be added as a shutdown hook... :(
  +        } catch (Exception e) {
  +            e.printStackTrace();
           }
       }
   
  @@ -133,9 +135,9 @@
                   addShutdownHookMethod.invoke(Runtime.getRuntime(), args);
                   added = true;
               } catch (IllegalAccessException e) {
  -                // it just won't be added as a shutdown hook... :(
  +                e.printStackTrace();
               } catch (InvocationTargetException e) {
  -                // it just won't be added as a shutdown hook... :(
  +                e.printStackTrace();
               }
           }
       }
  @@ -157,6 +159,7 @@
                   }
                   // 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 Process.destroy()
  @@ -169,7 +172,9 @@
                   destroyProcessThread = null;
                   added = false;
               } catch (IllegalAccessException e) {
  +                e.printStackTrace();
               } catch (InvocationTargetException e) {
  +                e.printStackTrace();
               }
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to