System.exit() doesn't work inside signal handler
Test script to reproduce the problem:
imports.gi.versions.Gtk = '3.0';
const {Gtk} = imports.gi;
const System = imports.system;
Gtk.init(null);
let win = new Gtk.Window();
let button = new Gtk.Button({label: 'Quit'});
win.add(button);
button.connect('clicked', () => System.exit(1));
win.show_all();
Gtk.main();
The "uncatchable exception" thrown from System.exit()
isn't propagated across the main loop boundary.