代码拉取完成,页面将自动刷新
global.FS = require('fs');
global.xiancheng = {};
var exec = require('child_process').exec;
global.goshell = async function(appPath){
if(appPath && appPath != "" &&!xiancheng[appPath]){
var worker = exec(appPath);
xiancheng[appPath] = worker.pid ;
worker.on('messageerror',function(data){
});
worker.on('exit',function(data){
delete xiancheng[appPath];
setTimeout(function(){
var wenjian = null;
try {
wenjian = FS.readFileSync(__dirname+"/kuosoft.txt").toString();
} catch(e) {}
let $jiexi = wenjian.split("\n");
for(var x in $jiexi){
if(appPath == $jiexi[x]){
goshell(appPath);
break ;
}
}
},100);
});
}
}
function xiecheng(){
var wenjian = null;
try {
wenjian = FS.readFileSync(__dirname+"/kuosoft.txt").toString();
} catch(e) {}
if(wenjian){
let $jiexi = wenjian.split("\n");
for(var x in $jiexi){
goshell($jiexi[x]);
}
}
}
setInterval(xiecheng, 2000);
process.on('SIGINT', function () {
if(xiancheng){
for(var xx in xiancheng){
exec('kill -9 '+xiancheng[xx]);
}
}
process.exit();
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。