src/Spawn.vala
authorAlan Knowles <alan@roojs.com>
Mon, 1 Jun 2015 10:19:41 +0000 (18:19 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 1 Jun 2015 10:19:41 +0000 (18:19 +0800)
src/Spawn.vala

index 7ae7e48..57e9daa 100644 (file)
@@ -154,7 +154,17 @@ public class Spawn : Object
                 
                GLib.debug("cd %s; %s" , this.cwd , string.joinv(" ", this.args));
                
-               
+               if (this.detach) { 
+                       Process.spawn_async_with_pipes (
+                               this.cwd,
+                               this.args,
+                               this.env.length > 0 ? this.env : null,
+                               SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
+                               null,
+                               out this.pid);
+                               return;
+
+               }
                Process.spawn_async_with_pipes (
                                this.cwd,
                                this.args,