Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Oct 4, 2025

resolves #111 also fixes graceful stop to allow .waitUntil() working properly

import { spawn } from "node:child_process";

const child = spawn("./bin/srvx.mjs", ["examples/hello-world"], {
  stdio: "inherit",
});

console.log("> Spawned child pid:", child.pid);
console.log("> Waiting 500ms");

await new Promise((r) => setTimeout(r, 500));

console.log('> Killing with "SIGINT"', child.kill());

@codecov
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cli.ts 0.00% 30 Missing ⚠️

📢 Thoughts on this report? Let us know!

@pi0 pi0 merged commit 1b697b1 into main Oct 7, 2025
3 of 4 checks passed
@pi0 pi0 deleted the fix/cli-kill2 branch October 7, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

srvx cli leaves server process alive when cli process is killed

2 participants