ChildWatch.add (this.pid, (w_pid, result) => {
this.result = result;
- if (this.debug) {
+ if (this.cfg.debug) {
stdout.printf("child_watch_add : result:%d ", result);
}
//print("write_char retunred:" + JSON.stringify(res) + ' ' +JSON.stringify(ret) );
- if (res != GLib.IOStatus.NORMAL) {
- throw "Write failed";
+ if (res != GLib.IOStatus.NORMAL) {
+ throw "Write failed";
}
//return ret.value;
return str.length;
string prop = (ch == this.out_ch) ? "output" : "stderr";
// print("prop: " + prop);
var _this = this;
-
+ string str_return;
//print(JSON.stringify(ch, null,4));
while (true) {
- var x = {};
- var status = ch.read_line( x);
+
+ var status = ch.read_line( str_return, len, term_pos );
// print('status: ' +JSON.stringify(status));
// print(JSON.stringify(x));
switch(status) {