Child processes are now terminated when the parent process dies. This means that if the main mailtrain process gets killed, there are no processes which remain running.

This commit is contained in:
Tomas Bures 2019-05-25 21:57:11 +02:00
parent 1270ca71f8
commit fcd2a61b65
14 changed files with 48 additions and 18 deletions

View file

@ -10,5 +10,10 @@ module.exports.init = (app, done) => {
type: 'zone-mta-started'
});
process.on('message', msg => {
if (msg === 'exit') {
process.exit(); }
});
done();
};