Description
Split off short-term enhancements for getText() deadlocking. Now allows various consumeProcessXXX variations and pipeTo:
def sout = new StringBuffer() def serr = new StringBuffer() proc2 = 'tr -d o'.execute() proc3 = 'tr -d e'.execute() proc4 = 'tr -d i'.execute() proc4.consumeProcessOutput(sout, serr) proc2 | proc3 | proc4 [proc2, proc3].each{ it.consumeProcessErrorStream(serr) } proc2.withWriter { writer -> writer << 'testfile.groovy' } proc4.waitForOrKill(1000) println 'sout: ' + sout println 'serr: ' + serr
Attachments
Issue Links
- is related to
-
GROOVY-2620 Process.consumeProcessXXX methods do not handle newline properly.
- Closed