Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 72272 invoked by uid 500); 7 Aug 2001 16:50:07 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 72259 invoked from network); 7 Aug 2001 16:50:07 -0000 Message-ID: <3B701DF9.8060007@sedonacorp.com> Date: Tue, 07 Aug 2001 12:57:29 -0400 From: Matthew Inger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010701 X-Accept-Language: en-us MIME-Version: 1.0 To: ant-user@jakarta.apache.org Subject: Re: Launch a separate process(terminal window) from Ant [Linux] References: <00ee01c11f5d$647d08e0$961e010a@BLAINE> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Filter-Version: 1.3 (netra1) X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N BlaineNewsletters(@yahoo) wrote: >I'm trying to launch a separate process from Ant (call Weblogic's startup >script, startWebLogic.sh) in a new window, and have the original window run >in parallel. >This is no problem within Win2000. I use the exec task to call "start" to >launch a new window and give it the command line parameters for >startWebLogic.cmd >When trying to use the exec task for Linux, I can't accomplish the same >thing. I've tried various different methods (xterm, sh) but without success. >I can get a new terminal launched and weblogic runs, but the originating >terminal waits for weblogic to complete before continuing. > >I haven't been able to figure out a way to correctly do this and I was >hoping somebody else had. As a last resort, people have suggested I call >"java" and then use "fork" to return control back to Ant. >Any suggestions? >---------------------------------------------------------------------------- >--------------------------------------------------- > > > > > > > > os="Linux,Solaris"> > > > >---------------------------------------------------------------------------- >--------------------------------------------------- > > > > > > > >os="Linux,Solaris"/> > > >------------------------------Contents of >startWebLogicInXTerm.sh----------------------------------------------------- >---- >#!/bin/sh >pushd /usr/local/bea/wlserver6.0/config/mydomain >xterm -e ".startWebLogic.sh" & >popd > >---------------------------------------------------------------------------- >--------------------------------------------------- > >Blaine Kendall, QA Developer >Everypath Canada Corp | www.everypath.com > > >_________________________________________________________ >Do You Yahoo!? >Get your free @yahoo.com address at http://mail.yahoo.com > > exec always waits for the process to finish it seems. on window2000, the start task spawns another process and then finishes, which is why you see control return to the command prompt. On unix, this is built in using the '&' character. However, the requested process is still running, so ant will wait for it. what you really need is some sort of wrapper that will create an os process which spawns the desired one in the background, and exits, without killing it's child processes. -- Matt Inger (matt.inger@sedonacorp.com) Sedona Corporation 455 S. Gulph Road, Suite 300 King of Prussia, PA 19406 (484) 679-2213 "Self-respect - the secure feeling that no one, as yet, is suspicious." -H.L. Mencken