Skip to content

Commit

Permalink
fix(linux): fix closing on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Aug 2, 2018
1 parent 745f000 commit 75ad00a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,20 @@ app.on('before-quit', () => {
app.isQuiting = true
if (sphinx)
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()
});

0 comments on commit 75ad00a

Please sign in to comment.