Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed May 3, 2023
1 parent 0e2763f commit f6609bd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/remix-dev/devServer_unstable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,12 @@ let relativePath = (file: string) => path.relative(process.cwd(), file);

let kill = async (p?: execa.ExecaChildProcess) => {
if (p === undefined) return;
// `execa`'s `kill` is not reliable on windows
if (process.platform === "win32") {
await execa("taskkill", ["/pid", String(p.pid), "/f", "/t"]);
return;
}

// wait one tick of the event loop so that we guarantee app server gets killed before proceeding
p.kill("SIGTERM", { forceKillAfterTimeout: 0 });
await new Promise((resolve) => setTimeout(resolve, 0));
// let channel = Channel.create<void>();
p.kill();
// p.on("exit", () => {
// console.log("EXITINGNOW");
// channel.ok();
// });
// await channel.result;
};

0 comments on commit f6609bd

Please sign in to comment.