I launch this process 
     p_Run_Mapper = Runtime.getRuntime().exec("usr/bin/ksh","my.ksh");
     while( p_Run_Mapper.waitFor() != 0 )
    {
       System.out.println("Inside p_Run_Mapper.waitFor() waiting for normal 
exit..");
     }
     while( p_Run_Mapper.exitValue() !=0 )
     {
       System.out.println("Inside p_Run_Maper.exitValue() waiting for exitValue 
to return 0");
     }
exit..

so the servlet says the process runs thru to exit (completion) the process 
doesnt get hung up in waitFor or exitValue() != 0 while loops..
but alas I have no clue what ksh process is actually doing ..
???
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "David Smith" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, June 29, 2006 1:24 PM
Subject: Re: exec'ing ksh from Servlet


> How is that messed up?  Makes perfect sense from the perspective of the 
> calling java code and is consistent with input and output streams for 
> files, network connections, etc., ...
> 
> --David
> 
> Leon Rosenberg wrote:
> 
>> Alas, the getInputStream and getOutputStream methods are mixed up, the
>> getInputStream method gives you the stdout of the process and the
>> getOutputStream - the stdin.
>> Leon
>>
>> On 6/29/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
>>
>>> I suppose you use Runtime.exec() ?
>>> If yes, you should grab the process output and error streams from the
>>> resulting Process class:
>>>
>>> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html
>>>
>>> regards
>>> Leon
>>>
>>> On 6/29/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
>>> > Good Afternoon All-
>>> >
>>> > I am attempting to exec a kshell from a Servlet
>>> > I execute it fine but do not see any output or error messages from 
>>> catalina.out or my debug file (a redirect of output inside the kshell)
>>> > In other words I have no clue as to what this kshell script is 
>>> actually doing
>>> > Any Suggestions to find out what is happening???
>>> >
>>> > Many Thanks,
>>> > Martin --
>>> > *********************************************************************
>>> > This email message and any files transmitted with it contain 
>>> confidential
>>> > information intended only for the person(s) to whom this email 
>>> message is
>>> > addressed.  If you have received this email message in error, 
>>> please notify
>>> > the sender immediately by telephone or email and destroy the original
>>> > message without making a copy.  Thank you.
>>> >
>>> >
>>> >
>>> >
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to