Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15A3F9D74 for ; Sun, 12 Feb 2012 15:33:10 +0000 (UTC) Received: (qmail 76303 invoked by uid 500); 12 Feb 2012 15:33:09 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 76192 invoked by uid 500); 12 Feb 2012 15:33:08 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 76184 invoked by uid 99); 12 Feb 2012 15:33:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 15:33:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of whaefelinger@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 15:33:02 +0000 Received: by eaac1 with SMTP id c1so1546112eaa.4 for ; Sun, 12 Feb 2012 07:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=OdqIHasa66k+Suk8uPvxVKwgzXIUZw8vlDxWkaKmp30=; b=URqKT6MDDVwGxDNu1jNPK8LBmWosrZ4dQLrHTuL2CgCZ8gFPH7IMLXSku9xhk9MeZF 2D0LrX65dXxDtnyj4zK4tbk9AImjPSMkdoZZPvuGCeqyuqzESRwj2PPDrQFYyGMSpufz 9NzQzoDhiIQ3fnbq4S1YjDrw8D2SGnZ4lKQk8= MIME-Version: 1.0 Received: by 10.213.33.135 with SMTP id h7mr2200171ebd.22.1329060760985; Sun, 12 Feb 2012 07:32:40 -0800 (PST) Received: by 10.213.35.202 with HTTP; Sun, 12 Feb 2012 07:32:40 -0800 (PST) In-Reply-To: <1329056945.86381.YahooMailNeo@web161205.mail.bf1.yahoo.com> References: <1328674236.91530.YahooMailNeo@web161204.mail.bf1.yahoo.com> <1329056945.86381.YahooMailNeo@web161205.mail.bf1.yahoo.com> Date: Sun, 12 Feb 2012 16:32:40 +0100 Message-ID: Subject: Re: Regarding exec task From: =?ISO-8859-1?Q?wolfgang_h=E4felinger?= To: Ant Developers List , Vimil Saju Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > Is it possible to make the Execute class in ant extensible so that it bec= omes possible to plugin our own implementation of Process class. Implement your own ueber-exec taks which uses default exec class when not-on windows and otherwise makes use of your own jvnet-process exec task. On Sun, Feb 12, 2012 at 3:29 PM, Vimil Saju wrote: > > > > > Hi, > > I noticed that on windows, if I use the exec task to run a batch script w= hich in turn starts other processes then if kill ant then the sub-processes= created by the batch script still continues to run. I did some research on= google and found that the default java implementation of Process.destroy d= oes not kill the child processes created by a process on windows. I also fo= und that there are some third party libraries like jvnet that provide the c= apability of killing all processes created by a process on windows. > > So I thought of somehow extending the 'Execute' class of ant to use the f= unctionality of this 3rd party library, but I find that its difficult if no= t impossible to extend this class. I can't find a way to provide my impleme= ntation of Process class that does something different when its destroy met= hod is called. Other core tasks such as java task directly create an instan= ce of the 'Execute' class which makes it difficult to globally change how a= forked process is destroyed within ant. > > Is it possible to make the Execute class in ant extensible so that it bec= omes possible to plugin our own implementation of Process class. > > > Thanks > > Vimil --=20 Wolfgang H=E4felinger --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org