aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/ChildProcessUtilities/daemon/session.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/ChildProcessUtilities/daemon/session.ts b/src/server/ChildProcessUtilities/daemon/session.ts
index 3ae14e894..4a62381f8 100644
--- a/src/server/ChildProcessUtilities/daemon/session.ts
+++ b/src/server/ChildProcessUtilities/daemon/session.ts
@@ -24,8 +24,8 @@ createInterface(process.stdin, process.stdout).on('line', async line => {
case "exit":
identifiedLog(cyan("Initializing session end"));
await endPrevious();
- identifiedLog("Cleanup complete. Exiting session...");
- execSync("killall -9 node");
+ identifiedLog("Cleanup complete. Exiting session...\n");
+ execSync(killAllCommand());
break;
default:
identifiedLog(red("commands: { exit, restart }"));
@@ -75,6 +75,13 @@ function startServerCommand() {
return `osascript -e 'tell app "Terminal"\ndo script "cd ${pathFromRoot()} && npm run start-release"\nend tell'`;
}
+function killAllCommand() {
+ if (onWindows) {
+ return "taskkill /f /im node.exe";
+ }
+ return "killall -9 node";
+}
+
identifiedLog("Initializing session...");
writeLocalPidLog("session_manager", pid);