| Author |
Message |
   
Khandada
Side Hero Username: Khandada
Post Number: 2819 Registered: 10-2008 Posted From: 64.79.135.151
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:48 pm: |
    |
simba thanks a lot bro...i think i will take the timer route Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall |
   
Khandada
Side Hero Username: Khandada
Post Number: 2818 Registered: 10-2008 Posted From: 64.79.135.151
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:41 pm: |
    |
mav, analog yeah looks like the sh script has to do something will explore..thanks Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall |
   
Simba
Side Hero Username: Simba
Post Number: 5833 Registered: 02-2008 Posted From: 206.210.27.33
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:40 pm: |
    |
@khan bhai, you can always terminate a Process (forked by ProcessBuilder) using a java timer (time-based termination) For status based termination, let the external process write the status to disk/network/database, you can monitor the resource at terminate if need be. |
   
Analog
Comedian Username: Analog
Post Number: 1707 Registered: 05-2008 Posted From: 192.91.66.189
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:36 pm: |
    |
Khandada:
Is it possible to initialize a global variable to some value before invoking the script, and change that variable inside the script before exiting... You can track this variable and time limit to know the status of the shell script...Java idea ledu BTW NenoDi neeve gelichi... nee gelupu naadani thalachi... raagaalu ranjilu roje raaji rammanTi |
   
Maverick
Legend Username: Maverick
Post Number: 38255 Registered: 01-2008 Posted From: 70.39.231.172
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:22 pm: |
    |
create trigger file at the end of script and let the java program poll for file and time out after a time..java specific kaadu..general unix scripting angle Who is this DB member? |
   
Khandada
Side Hero Username: Khandada
Post Number: 2814 Registered: 10-2008 Posted From: 64.79.135.151
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 07, 2012 - 02:10 pm: |
    |
I have a java process which is going to execute a shell script I will be calling the script via the ProcessBuilder class when the script is executed...it will return a value of 0 ( successful) or another value (fail) as exit return value this is fine as long as the script completes I need to handle the case when the process initiated by the script is stuck - say network outage or something...it does not return anything back to the calling java process any ideas on how to set a threshold kind of time value programmatically to handle hanging threads/external processes? Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall |