Skip to content

ForkProcessOptions

ForkProcessOptions = object

Defined in: packages/node/src/process/fork-process.ts:18

readonly optional args?: readonly string[] | null

Defined in: packages/node/src/process/fork-process.ts:19


readonly optional cwd?: string | null

Defined in: packages/node/src/process/fork-process.ts:21


readonly optional env?: NodeJS.ProcessEnv | null

Defined in: packages/node/src/process/fork-process.ts:23


readonly optional execArgv?: readonly string[] | null

Defined in: packages/node/src/process/fork-process.ts:25


readonly optional graceMs?: number | null

Defined in: packages/node/src/process/fork-process.ts:52

Default 5000.


readonly optional onMessage?: Callable<[unknown]> | null

Defined in: packages/node/src/process/fork-process.ts:49

Pre-subscribed before the child can send anything.


readonly optional onOutput?: Callable<[ProcessOutputStream, string]> | null

Defined in: packages/node/src/process/fork-process.ts:44

Pre-subscribed before the child can write anything.


readonly optional serialization?: "json" | "advanced" | null

Defined in: packages/node/src/process/fork-process.ts:28

Default "advanced" — structured clone, so Uint8Array/BigInt survive.


readonly optional signal?: AbortSignal | null

Defined in: packages/node/src/process/fork-process.ts:31

Aborting terminates the child (SIGTERM, then SIGKILL after graceMs).


readonly optional stderr?: ProcessStdio | null

Defined in: packages/node/src/process/fork-process.ts:41

Default "inherit", or "pipe" when onOutput is given.


readonly optional stdout?: ProcessStdio | null

Defined in: packages/node/src/process/fork-process.ts:38

Default "inherit", or "pipe" when onOutput is given. output events only ever carry a piped stream. IPC uses its own fd, so nothing the child prints can corrupt it.