var cp = require('child_process');
var walk = require('walk');

var walker = walk.walk(__dirname + '/spec', {followLinks: false});
walker.on('file', function(root, stat, next) {

  var filepath = root + '/' + stat.name;
  cp.fork('node_modules/mocha/bin/_mocha', [filepath]);

  next();
});

var cp = require('child_process');
var join = require('path').join;
var walk = require('walk');
var mochaBin = join(__dirname, '..', 'node_modules', '.bin', 'mocha');

var walker = walk.walk(__dirname + '/spec', {followLinks: false});
walker.on('file', function(root, stat, next) {
  var filepath = root + '/' + stat.name;
  cp.spawn(mochaBin, [filepath], {stdio: 'inherit'});

  next();
});

Replace child_process.fork with child_process.spawn to correctly handle child's output.