--- /dev/null
+process.on('uncaughtException', function(error) {
+ process.send(error.stack);
+});
+
+var child = require('child_process').fork(__dirname + '/ping.js');
+process.on('message', function(msg) {
+ child.send(msg);
+});
+child.on('message', function (msg) {
+ process.send(msg);
+});
assert.equal msg, 'message'
done()
child.send 'message'
+
+ it 'should work in forked process', (done) ->
+ child = child_process.fork path.join(fixtures, 'module', 'fork_ping.js')
+ child.on 'message', (msg) ->
+ assert.equal msg, 'message'
+ done()
+ child.send 'message'