+10
-3
@@ -103,9 +103,16 @@ if (process.argv.includes('--extract-addons')) {
|
||||
process.on('SIGTERM', shutdown);
|
||||
process.on('SIGINT', shutdown);
|
||||
|
||||
// Chrome closes stdin when the port disconnects — exit cleanly.
|
||||
input.on('end', shutdown);
|
||||
input.on('close', shutdown);
|
||||
// Do not exit on stdin 'end'/'close' — Bare can emit those spuriously under
|
||||
// Chrome's native-messaging pipes (holesail-browser does not either). Chrome
|
||||
// kills the host when the port disconnects.
|
||||
|
||||
process.on('unhandledRejection', (reason) => {
|
||||
logErr('unhandledRejection: ' + (reason && (reason.stack || reason.message || reason)));
|
||||
});
|
||||
process.on('uncaughtException', (err) => {
|
||||
logErr('uncaughtException: ' + (err && (err.stack || err.message)));
|
||||
});
|
||||
|
||||
logErr('ready');
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user