electron/spec/fixtures/module/fork_ping.js

15 lines
334 B
JavaScript
Raw Normal View History

2013-09-05 01:21:39 +00:00
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);
});
child.on('exit', function(code) {
process.exit(code);
});