question on scripts results

Andreas Unterkircher <[email protected]>
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Hello,

from reading the documentation on "Shell Scripts and Process Management in 
SF" it was not clear to me if the following statements are equ1valent:

(1)

ScriptResults res2 = se.execute(...);
ComponentDescription res = res2.waitForResults(-1);
System.out.println("code "+res.resolve("code",200,true));

(2)

ScriptResults res2 = se.execute(...);
while(!res2.resultsReady()) {}
ComponentDescription res = res2.waitForResults(0);
System.out.println("code "+res.resolve("code",200,true));


First I thought this should be equivalent as "-1" means "wait forever" but 
in my case (I'm executing a "rpm -ivh ...") case (1) does not work, i.e. I 
get "code null" as output, but case (2) works, i.e. I get "code 0". I want 
the execution to hold until the rpm install really has finished and case 
(2) does this but not case (1). What's the difference between those two ?

Thanks,
Andreas



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.