Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 27447 invoked from network); 1 Apr 2003 00:18:31 -0000 Received: from inet-mail1.oracle.com (148.87.2.201) by daedalus.apache.org with SMTP; 1 Apr 2003 00:18:31 -0000 Received: from inet-mail1.oracle.com (localhost [127.0.0.1]) by inet-mail1.oracle.com (Switch-2.2.6/Switch-2.2.5) with ESMTP id h310Icg02608 for ; Mon, 31 Mar 2003 16:18:38 -0800 (PST) Received: from rgmgw4.us.oracle.com (rgmgw4.us.oracle.com [138.1.191.13]) by inet-mail1.oracle.com (Switch-2.2.6/Switch-2.2.5) with ESMTP id h310IcA02599 for ; Mon, 31 Mar 2003 16:18:38 -0800 (PST) Received: from rgmgw4.us.oracle.com (localhost [127.0.0.1]) by rgmgw4.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id h310IbH06552 for ; Mon, 31 Mar 2003 17:18:37 -0700 (MST) Received: from rgmum6.us.oracle.com (rgmum6.us.oracle.com [138.1.191.27]) by rgmgw4.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id h310IaC06512 for ; Mon, 31 Mar 2003 17:18:36 -0700 (MST) Received: from dhcp-4op11-4op12-west-130-35-178-10.us.oracle.com by rgmum13.us.oracle.com with ESMTP id 57564361049156281; Mon, 31 Mar 2003 17:18:01 -0700 Message-ID: <3E88DABE.FCA0B6E@oracle.com> Date: Mon, 31 Mar 2003 16:18:06 -0800 From: Melissa Hao Organization: Oracle Corporation X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Ant Users List , Bill Burton Subject: Re: getting the exec task to run a script which spawns a child process References: <3E5F9DF1.5ACA31CD@oracle.com> <3E5FAD9A.6070005@progress.com> Content-Type: multipart/alternative; boundary="------------F94CCDFE9352660B6580678E" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------F94CCDFE9352660B6580678E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I tried this; now the exec task doesn't hang but the bar process still stops when the ant process stops. Is there a way to get bar to run indefinitely? -- thanks Melissa Bill Burton wrote: > Hello, > > Melissa Hao wrote: > > Hi, > > > > I use the exec task to run a shell script called foo.sh. foo.sh has "bar &" inside of it, which spawns a background child process. foo.sh finishes pretty quickly, but the exec task waits for bar to finish before moving on. This is a problem for me because bar is supposed to run indefinitely. > > > > I searched this mailing list but I haven't found my exact problem. I found http://marc.theaimsgroup.com/?l=ant-user&m=100621497023872&w=2, which explains a workaround for getting foo.sh to run indefinitely. Do I use the same workaround to get bar to run indefeintely? > > I posted a more recent version you can read at > http://marc.theaimsgroup.com/?l=ant-user&m=104322316306620&w=2. > > But all you need to do in foo.sh is call bar like this: > nohup bar bar.out 2>&1 & > so that all of stdin, stdout and stderr are redirected before putting it > in the background. > > -Bill > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org --------------F94CCDFE9352660B6580678E--