MCPcopy Create free account
hub / github.com/MigoXLab/coderio / terminateChildProcess

Function terminateChildProcess

src/tools/launch-tool/utils/dev-server-manager.ts:18–30  ·  view source on GitHub ↗
(child: ChildProcess)

Source from the content-addressed store, hash-verified

16}
17
18function terminateChildProcess(child: ChildProcess): void {
19 // Windows does not support POSIX signals like SIGTERM reliably.
20 // Calling kill() without a signal uses the platform default behavior.
21 try {
22 if (process.platform === 'win32') {
23 child.kill();
24 } else {
25 child.kill('SIGTERM');
26 }
27 } catch {
28 // ignore
29 }
30}
31
32function normalizeExecutable(executable: string): string {
33 if (process.platform !== 'win32') {

Callers 2

startMethod · 0.85
stopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected