{"size": 475, "ext": "js", "max_stars_repo_path": "NodeJS_Quanweizhinan/9_2_child_process/test22.js", "max_stars_repo_name": "KoizumiSinya/NodeJsStudy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "NodeJS_Quanweizhinan/9_2_child_process/test22.js", "max_issues_repo_name": "KoizumiSinya/NodeJsStudy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "NodeJS_Quanweizhinan/9_2_child_process/test22.js", "max_forks_repo_name": "KoizumiSinya/NodeJsStudy", "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": 22.619047619, "max_line_length": 42, "alphanum_fraction": 0.5726315789}
var cp = require("child_process");
var sp1 = cp.fork("./test14_stdout.js", //
    ["one", "two", "three", "four"], //
    {silent: true});

var sp2 = cp.fork("test2.js");

sp1.stdout.on("data", function (data) {
    console.log("子进程标准输出:" + data);
    sp2.send(data.toString());
});

sp1.on("exit", function (code, signal) {
    console.log("子进程退出：" + code);
    process.exit();
});

sp1.on("error", function (err) {
    console.log("子进程开启失败:" + err);
    process.exit();
});