fix some readline closing issue

This commit is contained in:
2016-06-12 00:12:40 +02:00
parent b40d8452ec
commit 48aeb16dfd
4 changed files with 2 additions and 29 deletions

View File

@ -47,5 +47,4 @@ process.on('SIGINT', () => {
logEarlyAbort = true;
rl.write(null, {ctrl: true, name: 'u'});
rl.close();
process.exit(0);
});

View File

@ -33,19 +33,7 @@ export let stop = function(){
let done = q.defer();
if(doAnimation){
earlyChild.kill();
let rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.write(null, {ctrl: true, name: 'u'});
rl.close();
earlyChild.on("close",function(){
let rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.write(null, {ctrl: true, name: 'u'});
rl.close();
done.resolve();
})
} else {