// retoor <retoor@molodetz.nl>
// nontest
import "pexpect" for Spawn
import "timer" for Timer
System.print("Creating child")
var child = Spawn.new("echo test")
System.print("Child created, pid: %(child.pid)")
System.print("isalive: %(child.isalive)")
Timer.sleep(500)
System.print("After sleep, isalive: %(child.isalive)")
System.print("buffer: [%(child.buffer)]")
child.close()
System.print("Done")