this.out_src = (int) this.out_ch.add_watch (
IOCondition.OUT | IOCondition.IN | IOCondition.PRI | IOCondition.HUP | IOCondition.ERR ,
(channel, condition) => {
- return this.read(this.out_ch);
+ return this.out_ch != null ? this.read(this.out_ch) : true;
}
);
this.err_src = (int) this.err_ch.add_watch (
{
string prop = (ch == this.out_ch) ? "output" : "stderr";
// print("prop: " + prop);
- if (this.pid < 0) {
- return false; // spawn complete + closed... can't read any more.
- }
+
//print(JSON.stringify(ch, null,4));
while (true) {