Spawn.vala
[gitlive] / Spawn.vala
index b05e6b7..cdf3065 100644 (file)
@@ -241,6 +241,8 @@ public class Spawn : Object
             stdout.printf("PID: %d" ,this.pid);
         }
         
+        this.ref();
+        
         this.in_ch = new GLib.IOChannel.unix_new(standard_input);
         this.out_ch = new GLib.IOChannel.unix_new(standard_output);
         this.err_ch = new GLib.IOChannel.unix_new(standard_error);
@@ -249,7 +251,7 @@ public class Spawn : Object
         
         
             
-                  // using NONBLOCKING only works if io_add_watch
+        // using NONBLOCKING only works if io_add_watch
           //returns true/false in right conditions
           this.in_ch.set_flags (GLib.IOFlags.NONBLOCK);
           this.out_ch.set_flags (GLib.IOFlags.NONBLOCK);