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

Function kill

packages/platform/node-shared/src/NodeChildProcessSpawner.ts:546–556  ·  view source on GitHub ↗
(options?: ChildProcess.KillOptions | undefined)

Source from the content-addressed store, hash-verified

544 return Effect.fail(toPlatformError("exitCode", error, cmd))
545 })
546 const kill = (options?: ChildProcess.KillOptions | undefined) => {
547 const killWithTimeout = withTimeout(childProcess, cmd, options)
548 return killWithTimeout((command, childProcess, signal) =>
549 killProcessGroup(command, childProcess, signal).pipe(
550 Effect.catch(() => killProcess(command, childProcess, signal)),
551 Effect.andThen(Deferred.await(exitSignal))
552 )
553 ).pipe(
554 Effect.asVoid
555 )
556 }
557
558 return makeHandle({
559 pid,

Callers 1

withTimeoutFunction · 0.70

Calls 6

killProcessGroupFunction · 0.85
withTimeoutFunction · 0.70
killProcessFunction · 0.70
pipeMethod · 0.65
awaitMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected