const cluster=require ('cluster');
const fs = require('fs');
if (cluster.isMaster) {
var worker=cluster.fork();
var log= fs.createReadStream('access.log');
log.pipe(worker.process.stdout);
}else {
console.log(process.pid);
}
↧
这段代码在win7上会崩溃吗?
↧