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

index 57e9daa..7d97b08 100644 (file)
@@ -162,6 +162,12 @@ public class Spawn : Object
                                SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
                                null,
                                out this.pid);
+                               ChildWatch.add (this.pid, (pid, status) => {
+                                       // Triggered when the child indicated by child_pid exits
+                                       Process.close_pid (pid);
+                                        
+                               });
+                               
                                return;
 
                }