reduce warnings
[roobuilder] / src / Spawn.vala
index dac2877..3e09e1f 100644 (file)
@@ -319,6 +319,27 @@ public class Spawn : Object
     
     }
     
+    public async int run_async()
+    {
+               GLib.MainLoop loop = new GLib.MainLoop ();
+               this.complete.connect( (res, str,  stderr) => {
+                       loop.quit ();
+               });
+               try {
+                       this.run();
+               } catch (GLib.Error e) {
+                       return -1;
+               }
+               
+                
+               loop.run ();
+               return this.result;
+
+    
+    
+    }
+    
+    
     
 
     public void tidyup() // or kill