From 8e0e67c2dc7fd2a0fc546dbe2ffb3c6ac16bbabe Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 29 Aug 2016 16:17:04 +0800 Subject: [PATCH] Spawn.vala --- Spawn.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.2