From: Alan Knowles Date: Mon, 29 Aug 2016 08:17:04 +0000 (+0800) Subject: Spawn.vala X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=8e0e67c2dc7fd2a0fc546dbe2ffb3c6ac16bbabe Spawn.vala --- diff --git a/Spawn.vala b/Spawn.vala index b05e6b78..cdf3065a 100644 --- a/Spawn.vala +++ b/Spawn.vala @@ -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);