Hi bigtop ! Im finding that a complex shell script, run via Shell.groovy,
hangs when i call it.
Ive foud that the script fails after "PROCES :::::::: READ LINES" below, in
the debugging statement.
This is a shell script which starts a flume sink up using nohup, and then
cat's to a file that the sink is listening on. The script completes
normally when run from anywhere in the terminal.
Any thoughts on why the ITest Shell would hang ?
***************************
Thread.start {
def writer = new PrintWriter(new BufferedOutputStream(proc.out))
writer.println(script)
writer.close()
}
ByteArrayOutputStream baosErr = new ByteArrayOutputStream(4096);
proc.consumeProcessErrorStream(baosErr);
println(key+" PROCESS :::::: READ LINES")
out = proc.in.readLines()
// Possibly a bug in String.split as it generates a 1-element array on
an
// empty String
if (baosErr.size() != 0) {
err = baosErr.toString().split('\n');
}
else {
err = new ArrayList<String>();
}
println(key+" PROCESS::::::: wait for ")
--
Jay Vyas
http://jayunit100.blogspot.com