From 39df4d088970b337ae2164068e791222bdce34a5 Mon Sep 17 00:00:00 2001 From: Doran Date: Thu, 28 Sep 2023 16:14:43 +0200 Subject: [PATCH] Don't SIGKILL Meteor when a desktop build terminates normally When meteor-desktop automatically starts a Meteor server (e.g. through the `-b` option), and the build process terminates without any error, kill the Meteor/node process with SIGTERM instead of SIGKILL. One of the problems of not doing so is that Meteor will not in turn terminate Mongo. --- lib/meteorApp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/meteorApp.js b/lib/meteorApp.js index 1b133638..0f440006 100644 --- a/lib/meteorApp.js +++ b/lib/meteorApp.js @@ -423,9 +423,9 @@ export default class MeteorApp { ); // Kills the currently running meteor command. - function kill() { + function kill(signal = 'SIGKILL') { sll(''); - child.kill('SIGKILL'); + child.kill(signal); if (self.$.env.os.isWindows) { windowsKill(child.pid); } @@ -435,7 +435,7 @@ export default class MeteorApp { killTimeout = setTimeout(() => { clearTimeoutsAndIntervals(); desiredExit = true; - kill(); + kill('SIGTERM'); resolve(); }, 500); }