mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
rename BreakingExit call
(undo Brexit :-)
This commit is contained in:
parent
0622be843b
commit
b2f53a183e
14
packages/node_modules/node-red/red.js
vendored
14
packages/node_modules/node-red/red.js
vendored
@ -342,17 +342,17 @@ process.on('uncaughtException',function(err) {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
function brexit() {
|
function exitWhenStopped() {
|
||||||
RED.stop().then(function() {
|
RED.stop().then(function() {
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
process.on('SIGINT', brexit);
|
process.on('SIGINT', exitWhenStopped);
|
||||||
process.on('SIGTERM', brexit);
|
process.on('SIGTERM', exitWhenStopped);
|
||||||
process.on('SIGHUP', brexit);
|
process.on('SIGHUP', exitWhenStopped);
|
||||||
process.on('SIGUSR2', brexit); // for nodemon restart
|
process.on('SIGUSR2', exitWhenStopped); // for nodemon restart
|
||||||
process.on('SIGBREAK', brexit); // for windows ctrl-break
|
process.on('SIGBREAK', exitWhenStopped); // for windows ctrl-break
|
||||||
process.on('message', function(m) { // for PM2 under window with --shutdown-with-message
|
process.on('message', function(m) { // for PM2 under window with --shutdown-with-message
|
||||||
if (m === 'shutdown') { brexit }
|
if (m === 'shutdown') { exitWhenStopped }
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user