Interface: ExecaExecutorOptions
Defined in: src/batteries/media/engines/execa_executor.ts:82
Options for execaExecutor.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
defaultForceKillAfterDelay? | number | false | Default BinaryInvocation.forceKillAfterDelay (milliseconds before SIGKILL; false or Infinity disables escalation) applied when an invocation does not specify one. Remarks The delay is measured on the MONOTONIC clock from the moment the first kill signal is sent, and settlement follows ExecaExecutorOptions.defaultSettleEscalation: wait (default), cancel, or post-return polling. See ExecaExecutorOptions.detached for process targeting. Because the clock is monotonic, a wall-clock (NTP) step cannot move the deadline or strand the timer. Infinity disables escalation, like an infinite timeout disables its deadline. | src/batteries/media/engines/execa_executor.ts:107 |
defaultKillSignal? | string | Default BinaryInvocation.killSignal applied when an invocation does not specify one. | src/batteries/media/engines/execa_executor.ts:95 |
defaultSettleEscalation? | "wait" | "cancel" | "poll" | Default settlement policy when abort/timeout has begun and escalation is armed. Defaults to 'wait': no survivors, but settlement may be delayed up to the escalation deadline. 'cancel' returns fastest but survivors may remain; 'poll' returns fastest and kills a surviving target later, with a narrow PGID-reuse risk after return. Normal exits are unaffected. Wait and poll apply only with finite escalation and a known pid. Both probe numeric PGIDs: empty-and-reused between probes can mis-signal an unrelated group, bounded to the wait window in wait mode. With detached: false, settlement cancels escalation in every mode. | src/batteries/media/engines/execa_executor.ts:117 |
defaultTimeoutMs? | number | Default timeout in milliseconds when an invocation does not specify one (default: 120,000). 0, Infinity, and finite values above 2,147,483,647 mean no deadline; negative values and NaN reject before spawning. | src/batteries/media/engines/execa_executor.ts:93 |
detached? | boolean | Whether children are spawned as process-group leaders (detached: true in POSIX terms). Defaults to true. Remarks Group-kill is the executor's cancellation story: a binary behind a wrapper (sandbox → shell → command) leaves grandchildren, and a plain kill(pid) kills only the direct child. Spawning detached costs nothing at run time — the child keeps running like any other — and in exchange every termination path can signal the group (kill(-pid, …)) so those grandchildren die too. detached: false selects the direct-child termination story instead, and it is not merely a weaker group kill: the child is NOT a process-group leader, so -pid does not name its group. Every path then signals the direct child alone (subprocess.kill(sig)), probes the direct child's liveness (never the group's), and escalates SIGKILL to that same child. Settlement after termination is controlled by defaultSettleEscalation (default 'wait'). wait holds settlement until the detached group empties or SIGKILL is sent; cancel returns immediately and may leave descendants; poll returns immediately and watches the group later. | src/batteries/media/engines/execa_executor.ts:137 |
execa? | ExecaResolver | The execa function or an async resolver for it. Defaults to a lazy dynamic import of the execa package (optional peer). | src/batteries/media/engines/execa_executor.ts:87 |