Skip to content
Snippets Groups Projects
Commit b5baf3e8 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Catch SIGINT and SIGTERM signals

parent adb518ed
No related branches found
No related tags found
No related merge requests found
...@@ -48,10 +48,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -48,10 +48,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
win.resizeTo(900, 750); win.resizeTo(900, 750);
win.focus(); win.focus();
win.on('close', function() { process.on('exit', function(code) {
this.hide(); // Pretend to be closed already console.log("Process exiting with code " + code);
kill_processes(); kill_processes();
this.close(true); });
process.on('SIGINT', function() {
process.exit();
});
process.on('SIGTERM', function() {
process.exit();
}); });
$(document).ready(function() { $(document).ready(function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment