Skip to content

forkProcess

forkProcess(modulePath, options?): Promise<ForkedProcess>

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

Forks a Node module with an IPC channel and resolves once it has spawned, so the returned handle always has a pid and a live channel. A spawn failure rejects here rather than surfacing later on the handle.

string

The module to run as the child.

ForkProcessOptions

Streams, environment, cancellation. See ForkProcessOptions.

Promise<ForkedProcess>

A handle over the running child.

When the module cannot be forked.