Skip to content

Commit

Permalink
Fix clients not exiting correctly again
Browse files Browse the repository at this point in the history
  • Loading branch information
sfaber34 committed May 9, 2024
1 parent 3dd730c commit 6649b29
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/nextjs/public/bgnodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ function checkMacLinuxPrereqs(platform) {
execSync("brew install openssl", { stdio: "inherit" });
}
// execSync(`npm install -g blessed blessed-contrib`, { stdio: "inherit" });
process.exit(0);
}

function checkWindowsPrereqs() {
Expand Down Expand Up @@ -411,20 +410,17 @@ function startChain(executionClient, consensusClient, jwtDir, platform) {

// Quit on Escape, q, or Control-C.
screen.key(["escape", "q", "C-c"], function (ch, key) {
const gethPID = execSync(`pgrep geth`).toString().trim();
if (gethPID !== "") {
// TODO: Make Windows processes exit
if (executionClient === "geth") {
execSync("pkill geth", { stdio: "ignore" });
}

const rethPID = execSync(`pgrep reth`).toString().trim();
if (rethPID !== "") {
} else if (executionClient === "reth") {
execSync("pkill reth", { stdio: "ignore" });
}

const lighthousePID = execSync(`pgrep lighthouse`).toString().trim();
if (lighthousePID !== "") {
if (consensusClient === "lighthouse") {
execSync("pkill lighthouse", { stdio: "ignore" });
}

return process.exit(0);
});

Expand Down

0 comments on commit 6649b29

Please sign in to comment.