README.txt
[gitlive] / Spawn.js
index 55adf1c..84d5a26 100644 (file)
--- a/Spawn.js
+++ b/Spawn.js
@@ -108,7 +108,7 @@ Spawn.prototype = {
     cwd: false,
     args: false,
     exceptions : false,
-    debug : true,
+    debug : false,
     /**
      * @property output {String} resulting output
      */
@@ -212,9 +212,9 @@ Spawn.prototype = {
         }
         
         
-        this.in_ch = GLib.io_channel_unix_new(ret.standard_input);
-        this.out_ch = GLib.io_channel_unix_new(ret.standard_output);
-        this.err_ch = GLib.io_channel_unix_new(ret.standard_error);
+        this.in_ch = new GLib.IOChannel.unix_new(ret.standard_input);
+        this.out_ch = new GLib.IOChannel.unix_new(ret.standard_output);
+        this.err_ch = new GLib.IOChannel.unix_new(ret.standard_error);
         
         // make everything non-blocking!
         
@@ -313,18 +313,18 @@ Spawn.prototype = {
             return 0; // input is closed
         }
        //print("write: " + str);
-       // NEEDS GIR FIX! for return value..
-       var ret = {};
-        var res = this.in_ch.write_chars(str, str.length, ret);
-       //var res = this.in_ch.write_chars(str, str.length);
+       // NEEDS GIR FIX! for return value.. let's ignore for the time being..
+       //var ret = {};
+        //var res = this.in_ch.write_chars(str, str.length, ret);
+       var res = this.in_ch.write_chars(str, str.length);
        
        //print("write_char retunred:" + JSON.stringify(res) +  ' ' +JSON.stringify(ret)  );
        
         if (res != GLib.IOStatus.NORMAL) {
             throw "Write failed";
         }
-        return ret.value;
-        //return str.length;
+        //return ret.value;
+        return str.length;
         
     },