Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Problem with SSHEXEC and nohup

Problem with SSHEXEC and nohup

2005-05-13       - By Alexey N. Solofnenko
Reply:     1     2     3  

The command does not work, because you need to redirect STDxxx file
handles to /dev/null (or some file(s)) first. You may also need to run a
script interpreter first, or create a separate script in order to be
able to redirect STDxxx handles.

- Alexey.

Dave Bartmess wrote:

>I'm trying to do a four-task parallel call, using sshexec to call the
>remote builds. Each build is a replica of the calling build, just on a
>different platform.
>
>The build script portion is below.
>
>The problem is, when ant executes the sshexec task, despite what I put
>in the remotebuild.sh, such as "nohup ... &" (insert command for "...")
>or send the command through sshexec as "nohup remotebuild.sh 2>&1
>>build.log &", it won't work. It waits for the build command
>inside the remotebuild.sh to complete, no matter if the build command
>itself is nohup'd, or the sshexec command is nohup'd.
>
>I could use some help. I've tried every alternative I could think of...
>
>Thanks!
>
>*************************************************
>(WITH nohup in the ssh'd command)
>
>local build script:
><target name="build-linux">
>  <sshexec
>      command="nohup ./remotebuild.sh ${product.name} ${build.number}
>2&gt;&amp;1 &gt;build.log &amp;"
>      username="${Linux.build.user}"
>      host="${Linux.build.host}"
>      keyfile="${env.HOME}/.ssh/id_dsa"
>      trust="true"/>
>  </target>
>
>remote build script:
>cvs co -A $PRODUCT
>./build installer.xml -Dbuild.number=$2 installer
>exit
>
>*************************************************
>(WITH nohup in the remote command script)
>
>local build script:
><target name="build-linux">
>  <sshexec
>      command="./remotebuild.sh ${product.name} ${build.number}"
>      username="${Linux.build.user}"
>      host="${Linux.build.host}"
>      keyfile="${env.HOME}/.ssh/id_dsa"
>      trust="true"/>
>  </target>
>
>remote build script:
>cvs co -A $PRODUCT
>nohup ./build installer.xml -Dbuild.number=$2 installer 2>&1 >build.log
>&
>exit
>
>*************************************************
>
>  
>

--
------------------------------------------------------------------------
/ Alexey N. Solofnenko
home: http://trelony.cjb.net/
/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.