A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
17
Task/Fork/Groovy/fork.groovy
Normal file
17
Task/Fork/Groovy/fork.groovy
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
println "BEFORE PROCESS"
|
||||
Process p = Runtime.runtime.exec('''
|
||||
C:/cygwin/bin/sh -c "
|
||||
/usr/bin/date +'BEFORE LOOP: %T';
|
||||
for i in 1 2 3 4 ; do
|
||||
/usr/bin/sleep 1;
|
||||
/usr/bin/echo \$i;
|
||||
done;
|
||||
/usr/bin/date +'AFTER LOOP: %T'"
|
||||
''')
|
||||
p.consumeProcessOutput(System.out, System.err)
|
||||
(0..<8).each {
|
||||
Thread.sleep(500)
|
||||
print '.'
|
||||
}
|
||||
p.waitFor()
|
||||
println "AFTER PROCESS"
|
||||
Loading…
Add table
Add a link
Reference in a new issue