You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Basel Ahmed <B0...@FDS.com> on 2004/01/14 22:39:12 UTC

problem with exec & rsh

Hello,

I have a problem with rsh called through the ant exec directive not 
terminating properly.

Synopsis:

I have an ant script that handles building the application ear file on a 
build server.  Upon
successfully completing the build tasks, it then calls a deploy task which 
attempts to install
the ear to a remote server using ant's <exec> directive and the Unix rsh 
command.

Problem:

>From all indications, the scripts are called properly and the remote 
deploy does in fact 
complete successfully, however the rsh process does not terminate. 
Furthermore, it looks
like a second rsh process is being spawned by the first one as indicated 
by the process id
(the process id for rsh process #2 has a parent process number of rsh 
process #1).

My Questions:

1 -  Has anyone else experienced this and if so, is there a known 
resolution?

2 -  What could be resulting in the second rsh process being spawn and 
does anyone have
any suggestions on how I can further debug this issue?

3 - Can anyone offer some insight into a better way of doing the same 
thing and possibly
in a more robust manner?

Below is the specific task responsible for the remote deploy:

<!-- 
====================================================================== -->
<!-- Target Name: remotedeploy  -->
<!-- 
====================================================================== -->
<target name="remotedeploy"
        description="Deploy EAR package"
        depends="transfer" >

  <echo message="Deploying fedad${build.name}.ear copied to: 
${deploy.to.server} " />
  <exec executable="/usr/bin/rsh">
     <arg line="${deploy.to.server} -l fsgapp &quot;scripts/deploy.sh 
fedad${build.name}.ear&quot;" />
  </exec>

  <exec executable="bin/deploy_notify.sh">
     <arg line="fedad${build.name}.ear ${deploy.to.server}" />
  </exec>

</target>


Thanks in advance!