fix(linux): fix closing on linux

This commit is contained in:
Alexey Kasyanchuk 2018-08-02 18:22:05 +03:00
parent 02bc92fc11
commit 2631662168

View File

@ -318,3 +318,19 @@ app.on('before-quit', () => {
if (sphinx) if (sphinx)
stop() stop()
}) })
var rl = require("readline").createInterface({
input: process.stdin,
output: process.stdout
});
rl.on("SIGINT", function () {
process.emit("SIGINT");
});
process.on("SIGINT", () => {
if (sphinx)
stop()
else
app.quit()
});