blob: c4a055e657fa1e44dd4591b74f3b4f9f8186047a [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001var spawn = require('child_process').spawn;
2
3function loop() {
4 console.log('starting');
5 console.log(this);
6 //var child = spawn('./node_modules/nodeunit/bin/nodeunit', ['test']);
7 var child = spawn('node', ['child.js']);
8 child.stdout.on('data', function(buffer) {
9 process.stdout.write(buffer);
10 });
11 child.on('exit', this.async());
12}
13
14var context = {
15 async: function() { return loop.bind(context); }
16};
17loop.call(context);