---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/media/engines/execa_executor/interfaces/ExecaSubprocessLike.md
description: >-
  The subprocess handle execa returns: promise-shaped AND carrying the live OS
  process.
---

# Interface: ExecaSubprocessLike

Defined in: [src/batteries/media/engines/execa\_executor.ts:31](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/media/engines/execa_executor.ts#L31)

The subprocess handle execa returns: promise-shaped AND carrying the live OS process.

## Remarks

Kept minimal for BYO substitution in tests — a consumer may supply any function of this shape
instead of execa. The default resolver returns execa's own subprocess, which is a promise with
`pid`/`kill` merged in; the group-kill path reads `pid` and only ever calls `kill`, so a
hand-rolled fake without them simply falls back to execa's own kill behaviour.

## Properties

| Property                            | Modifier   | Type                                                                                                                                                                                                                                                                                           | Description                                                                       | Defined in                                                                                                                                                |
| ----------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `catch` | `public`   | <`TResult`>(`onrejected?`: ((`reason`: `any`) => `TResult` | `PromiseLike`<`TResult`>) | `null`) => `Promise`<[`ExecaResultLike`](ExecaResultLike.md) | `TResult`>                                                                                                                    | The promise-style rejection surface.                                              | [src/batteries/media/engines/execa\_executor.ts:39](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/media/engines/execa_executor.ts#L39) |
|  `kill`   | `public`   | (`signal?`: `string`) => `boolean`                                                                                                                                                                                                                                                             | Send a signal to the process. Execa's own kill honours `forceKillAfterDelay`.     | [src/batteries/media/engines/execa\_executor.ts:35](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/media/engines/execa_executor.ts#L35) |
|  `pid?`    | `readonly` | `number`                                                                                                                                                                                                                                                                                       | The spawned process id; `undefined` when the process failed to spawn.             | [src/batteries/media/engines/execa\_executor.ts:33](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/media/engines/execa_executor.ts#L33) |
|  `then`   | `public`   | <`TResult1`, `TResult2`>(`onfulfilled?`: | ((`value`: [`ExecaResultLike`](ExecaResultLike.md)) => `TResult1` | `PromiseLike`<`TResult1`>) | `null`, `onrejected?`: ((`reason`: `any`) => `TResult2` | `PromiseLike`<`TResult2`>) | `null`) => `Promise`<`TResult1` | `TResult2`> | The promise-style completion surface (`then`/`catch` merged onto the subprocess). | [src/batteries/media/engines/execa\_executor.ts:37](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/media/engines/execa_executor.ts#L37) |
