Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 94302 invoked from network); 7 Dec 2004 17:25:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Dec 2004 17:25:46 -0000 Received: (qmail 72656 invoked by uid 500); 7 Dec 2004 17:25:38 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 72577 invoked by uid 500); 7 Dec 2004 17:25:37 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 72553 invoked by uid 99); 7 Dec 2004 17:25:37 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 07 Dec 2004 09:25:37 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id iB7HPY3t016581 for ; Tue, 7 Dec 2004 18:25:34 +0100 Received: (from nobody@localhost) by ajax.apache.org (8.12.11/8.12.11/Submit) id iB7HPYYA016579; Tue, 7 Dec 2004 18:25:34 +0100 Date: Tue, 7 Dec 2004 18:25:34 +0100 Message-Id: <200412071725.iB7HPYYA016579@ajax.apache.org> From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 8510] - shutdown hook does not fire in forked java task under JDK1.4 X-Bugzilla-Reason: AssignedTo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=8510 ------- Additional Comments From peterreilly@apache.org 2004-12-07 18:25 ------- I tested your example problem and saw the same thing under linux. However, I then read Conor's report "Note that the use of output or error streams to determine if the shutdown hook has fired or not is suspect. The above file based approach is more conclusive." So, I changed the code to do: public class Shutter extends Thread { public void run() { // log.debug("clean shutdown"); System.err.println("DEMO shutdown hook fired"); try { java.io.PrintWriter pw = new java.io.PrintWriter( new java.io.FileOutputStream("test.txt")); Thread.currentThread().sleep(3000); pw.println("Test"); pw.close(); } catch (Exception e) { } System.err.flush(); System.out.println("clean shutdown..."); } } And noted that clean shutdown... was not seen, but the file was created and written to, and the DEMO shutdown hook fired message was seen. Can you make the above changes and see if they fix the problem? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org