{"size": 581, "ext": "js", "max_stars_repo_path": "day10/4.msg.js", "max_stars_repo_name": "Crystal2030/nodestudy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "day10/4.msg.js", "max_issues_repo_name": "Crystal2030/nodestudy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "day10/4.msg.js", "max_forks_repo_name": "Crystal2030/nodestudy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.0344827586, "max_line_length": 56, "alphanum_fraction": 0.7125645439}
/**
 *child process：子进程，可以创建一个系统子进程，并执行shell命令
 */
var child_process = require('child_process');

//创建子进程的两个方法
//1.spawn :通过事件监听
//2.exec：通过回调函数
var spawn = child_process.spawn;
//执行一个命令，开启一个子进程
var subProcess = spawn(process.execPath, ['client.js']);
//subProcess.stdout：readable 流
subProcess.stdout.on('data', function(data){
	console.log(data.toString());
});

subProcess.on('error', function(error){
	console.log(error);
})


subProcess.on('message', function(){
	console.log(arguments);
})

subProcess.on('exit', function(){
	console.log('活干完，下班');
})
console.log('continue');