var runsync = require("../index.js");

setInterval(function() {
    for(var i = 0; i < 500; i++) {
        runsync.spawn("echo", ["hello"]);
    }
    console.log(process.memoryUsage());
}, 400);



@@ -99,16 +99,26 @@
 %0A       
+ var res =
  runsync
@@ -144,16 +144,79 @@
 llo%22%5D);%0A
+        if(res.error) %7B%0A            throw res.error;%0A        %7D%0A
     %7D%0A  

Exit check_memory_leak.js if error occurred