MCPcopy Create free account
hub / github.com/Effect-TS/effect / taskkill

Function taskkill

packages/platform/node-shared/src/NodeChildProcessSpawner.ts:69–78  ·  view source on GitHub ↗
(
  childProcess: NodeChildProcess.ChildProcess,
  onExit: (error: NodeChildProcess.ExecException | null) => void = () => {}
)

Source from the content-addressed store, hash-verified

67type ExitSignal = Deferred.Deferred<ExitCodeWithSignal>
68
69const taskkill = (
70 childProcess: NodeChildProcess.ChildProcess,
71 onExit: (error: NodeChildProcess.ExecException | null) => void = () => {}
72) =>
73 NodeChildProcess.execFile(
74 "taskkill",
75 ["/pid", String(childProcess.pid!), "/T", "/F"],
76 { windowsHide: true },
77 onExit
78 )
79
80const make = Effect.gen(function*() {
81 const fs = yield* FileSystem.FileSystem

Callers 2

killProcessGroupFunction · 0.85
killProcessGroupOnExitFunction · 0.85

Calls 1

StringInterface · 0.50

Tested by

no test coverage detected