MCPcopy Create free account
hub / github.com/agent-tower/core / buildPtyCommandWithStdin

Function buildPtyCommandWithStdin

packages/server/src/utils/process-launch.ts:257–266  ·  view source on GitHub ↗
(
  programPath: string,
  args: string[],
  stdinFile: string
)

Source from the content-addressed store, hash-verified

255 return spawn(process.env.ComSpec || 'cmd.exe', ['/d', '/s', '/c', '"' + cmdLine + '"'], {
256 stdio: stdioOpt,
257 env: getChildEnv(),
258 windowsVerbatimArguments: true,
259 windowsHide: true,
260 });
261}
262
263// Unix: detached 使 child 自成进程组组长,便于整组击杀。
264// stdio 继承的 PTY fd 不受影响(isatty 仍为 true);终止信号统一由
265// 本 wrapper 经 killTree 显式转发。Windows 下 detached 会脱离 ConPTY,
266// 保持默认行为。
267function spawnChild(args, stdioOpt) {
268 return spawn(programPath, args, {
269 stdio: stdioOpt,

Callers 2

spawnWithStdinFunction · 0.85

Calls 1

getNodeRuntimeCommandFunction · 0.85

Tested by

no test coverage detected