Clean up Windows readline-SIGINT support
This commit is contained in:
parent
d8de60a02d
commit
89f0e43570
11
lib/cylon.js
11
lib/cylon.js
|
@ -24,7 +24,6 @@ var Cylon = (function() {
|
|||
|
||||
var instance = null;
|
||||
|
||||
|
||||
// Public: Fetches singleton instance of Master, or creates a new one if it
|
||||
// doesn't already exist
|
||||
//
|
||||
|
@ -49,14 +48,12 @@ var Cylon = (function() {
|
|||
this.self = this;
|
||||
|
||||
if (process.platform === "win32") {
|
||||
var readline = require("readline");
|
||||
var readline = require("readline"),
|
||||
io = { input: process.stdin, output: process.stdout }
|
||||
|
||||
var rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
readline.createInterface(io).on("SIGINT", function() {
|
||||
process.emit("SIGINT");
|
||||
});
|
||||
|
||||
rl.on("SIGINT", function() { return process.emit("SIGINT"); });
|
||||
}
|
||||
|
||||
process.on("SIGINT", function() {
|
||||
|
|
Loading…
Reference in New Issue