Make upload task abort when parent dies

This commit is contained in:
Girish Ramakrishnan
2018-11-26 19:11:30 -08:00
parent e3ee5bc1d5
commit 48fbe28355
+6
View File
@@ -31,6 +31,12 @@ process.on('SIGTERM', function () {
process.exit(0);
});
// this can happen when the backup task is terminated (not box code)
process.on('disconnect', function () {
debug('parent process died');
process.exit(0);
});
initialize(function (error) {
if (error) throw error;