MCPcopy Create free account
hub / github.com/codeaashu/claude-code / wrapSpawn

Function wrapSpawn

src/utils/ShellCommand.ts:387–403  ·  view source on GitHub ↗
(
  childProcess: ChildProcess,
  abortSignal: AbortSignal,
  timeout: number,
  taskOutput: TaskOutput,
  shouldAutoBackground = false,
  maxOutputBytes = MAX_TASK_OUTPUT_BYTES,
)

Source from the content-addressed store, hash-verified

385 * Wraps a child process to enable flexible handling of shell command execution.
386 */
387export function wrapSpawn(
388 childProcess: ChildProcess,
389 abortSignal: AbortSignal,
390 timeout: number,
391 taskOutput: TaskOutput,
392 shouldAutoBackground = false,
393 maxOutputBytes = MAX_TASK_OUTPUT_BYTES,
394): ShellCommand {
395 return new ShellCommandImpl(
396 childProcess,
397 abortSignal,
398 timeout,
399 taskOutput,
400 shouldAutoBackground,
401 maxOutputBytes,
402 )
403}
404
405/**
406 * Static ShellCommand implementation for commands that were aborted before execution.

Callers 2

execFunction · 0.85
execCommandHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected