MCPcopy Create free account
hub / github.com/aptdnfapt/qwen-code-oai-proxy / stopProcess

Function stopProcess

scripts/smoke-packaged-install.ts:73–86  ·  view source on GitHub ↗
(child: import("node:child_process").ChildProcess)

Source from the content-addressed store, hash-verified

71}
72
73async function stopProcess(child: import("node:child_process").ChildProcess): Promise<void> {
74 const exitPromise = new Promise<void>((resolve, reject) => {
75 child.once("exit", () => resolve());
76 child.once("error", reject);
77 });
78
79 child.kill("SIGTERM");
80
81 const timeoutPromise = new Promise<never>((_, reject) => {
82 setTimeout(() => reject(new Error("installed CLI did not stop after SIGTERM")), 10000);
83 });
84
85 await Promise.race([exitPromise, timeoutPromise]);
86}
87
88async function main(): Promise<void> {
89 const projectRoot = process.cwd();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected