fix some readline closing issue

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

3
dist/early.child.js vendored
View File

@ -45,7 +45,6 @@ process.on('SIGINT', function () {
logEarlyAbort = true; logEarlyAbort = true;
rl.write(null, { ctrl: true, name: 'u' }); rl.write(null, { ctrl: true, name: 'u' });
rl.close(); rl.close();
process.exit(0);
}); });
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVhcmx5LmNoaWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQy9CLElBQU8sUUFBUSxXQUFXLFVBQVUsQ0FBQyxDQUFDO0FBQ3RDLElBQUksRUFBRSxHQUFHLFFBQVEsQ0FBQyxlQUFlLENBQUM7SUFDOUIsS0FBSyxFQUFFLE9BQU8sQ0FBQyxLQUFLO0lBQ3BCLE1BQU0sRUFBRSxPQUFPLENBQUMsTUFBTTtDQUN6QixDQUFDLENBQUM7QUFFSCxJQUFJLFVBQWlCLENBQUM7QUFDdEIsSUFBSSxZQUFtQixDQUFDO0FBQ3hCLElBQUksWUFBWSxHQUFVLENBQUMsQ0FBQztBQUU1QixJQUFJLFNBQVMsR0FBRztJQUNaLElBQUksWUFBWSxHQUFVLEdBQUc7VUFDdkIsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDO1VBQzlCLEdBQUcsQ0FBQyxNQUFNLENBQUMsWUFBWSxHQUFHLFlBQVksQ0FBQztVQUN2QyxHQUFHO1VBQ0gsWUFBWTtVQUNaLFVBQVUsQ0FBQyxJQUFJLENBQUM7SUFFdEIsRUFBRSxDQUFBLENBQUMsWUFBWSxJQUFJLFlBQVksQ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QXJnOnN0cmluZyA9IFwiXCIsbG9hZGVyTGVuZ3RoQXJnOnN0cmluZyA9IFwiMTBcIil7XG4gICAgbW9kdWxlTmFtZSA9IG1vZHVsZU5hbWVBcmc7XG4gICAgbG9hZGVyTGVuZ3RoID0gcGFyc2VJbnQobG9hZGVyTGVuZ3RoQXJnKTtcbiAgICBsb2dFYXJseSgpO1xufTtcblxuc3RhcnQocHJvY2Vzcy5lbnYubW9kdWxlTmFtZUFyZyxwcm9jZXNzLmVudi5sb2FkZXJMZW5ndGhBcmcpO1xuXG5wcm9jZXNzLm9uKCdTSUdJTlQnLCAoKSA9PiB7XG4gICAgbG9nRWFybHlBYm9ydCA9IHRydWU7XG4gICAgcmwud3JpdGUobnVsbCwge2N0cmw6IHRydWUsIG5hbWU6ICd1J30pO1xuICAgIHJsLmNsb3NlKCk7XG59KTsiXX0=

15
dist/index.js vendored
View File

@ -2,7 +2,6 @@
require("typings-global"); require("typings-global");
var path = require("path"); var path = require("path");
var q = require("q"); var q = require("q");
var readline = require("readline");
var childProcess = require("child_process"); var childProcess = require("child_process");
var earlyChild; var earlyChild;
var doAnimation = true; var doAnimation = true;
@ -34,19 +33,7 @@ exports.stop = function () {
var done = q.defer(); var done = q.defer();
if (doAnimation) { if (doAnimation) {
earlyChild.kill(); earlyChild.kill();
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.write(null, { ctrl: true, name: 'u' });
rl.close();
earlyChild.on("close", function () { earlyChild.on("close", function () {
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.write(null, { ctrl: true, name: 'u' });
rl.close();
done.resolve(); done.resolve();
}); });
} }
@ -56,4 +43,4 @@ exports.stop = function () {
return done.promise; return done.promise;
}; };
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUNQLENBQUMsQ0FEc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ixsb2FkZXJMZW5ndGhBcmc6c3RyaW5nID0gXCIxMFwiKXtcbiAgICBpZihkb0FuaW1hdGlvbil7XG4gICAgICAgIGVhcmx5Q2hpbGQgPSBjaGlsZFByb2Nlc3MuZm9yayhwYXRoLmpvaW4oX19kaXJuYW1lLFwiZWFybHkuY2hpbGQuanNcIiksW10se1xuICAgICAgICAgICAgZW52OiB7XG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZUFyZzptb2R1bGVOYW1lQXJnLFxuICAgICAgICAgICAgICAgIGxvYWRlckxlbmd0aEFyZzpsb2FkZXJMZW5ndGhBcmcsXG4gICAgICAgICAgICAgICAgQ0k6IHByb2Nlc3MuZW52LkNJXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAoZG9UZXh0KSB7XG4gICAgICAgIGNvbnNvbGUubG9nKFwiKioqKiBzdGFydGluZyBcIiArIG1vZHVsZU5hbWVBcmcuY3lhbiArIFwiICoqKipcIik7XG4gICAgfVxufTtcblxuZXhwb3J0IGxldCBzdG9wID0gZnVuY3Rpb24oKXtcbiAgICBsZXQgZG9uZSA9IHEuZGVmZXIoKTtcbiAgICBpZihkb0FuaW1hdGlvbil7XG4gICAgICAgIGVhcmx5Q2hpbGQua2lsbCgpO1xuICAgICAgICBlYXJseUNoaWxkLm9uKFwiY2xvc2VcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgZG9uZS5yZXNvbHZlKCk7XG4gICAgICAgIH0pXG4gICAgfSBlbHNlIHtcbiAgICAgICAgZG9uZS5yZXNvbHZlKCk7XG4gICAgfVxuICAgIHJldHVybiBkb25lLnByb21pc2U7XG59O1xuXG4iXX0=

View File

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

View File

@ -33,19 +33,7 @@ export let stop = function(){
let done = q.defer(); let done = q.defer();
if(doAnimation){ if(doAnimation){
earlyChild.kill(); 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(){ 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(); done.resolve();
}) })
} else { } else {