stdout.printf("PID: %d" ,this.pid);
}
- this.ref();
+ this.ref(); // additional ref - cleared on tidyup...
this.in_ch = new GLib.IOChannel.unix_new(standard_input);
this.out_ch = new GLib.IOChannel.unix_new(standard_output);
{
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) {