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

Function wrapSpawn

source code/utils/ShellCommand.ts:389–405  ·  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

387 * Wraps a child process to enable flexible handling of shell command execution.
388 */
389export function wrapSpawn(
390 childProcess: ChildProcess,
391 abortSignal: AbortSignal,
392 timeout: number,
393 taskOutput: TaskOutput,
394 shouldAutoBackground = false,
395 maxOutputBytes = MAX_TASK_OUTPUT_BYTES,
396): ShellCommand {
397 return new ShellCommandImpl(
398 childProcess,
399 abortSignal,
400 timeout,
401 taskOutput,
402 shouldAutoBackground,
403 maxOutputBytes,
404 )
405}
406
407/**
408 * 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