Class: AppKitChildProcess
Start and stop one AppKit-owned subprocess.
The spawn arguments use exec.ExecOptions, including core exec’s stdin, output capture, line handlers, exit checking, and trim policy. When configured, AppKitChildProcessOptions.healthCheck is polled until ready before start resolves. Shutdown aborts any active probe and delegates process-tree termination to exec.kill.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppKitChildProcess(
spawnArgs,options?):AppKitChildProcess
Parameters
Section titled “Parameters”spawnArgs
Section titled “spawnArgs”options?
Section titled “options?”AppKitChildProcessOptions = {}
Returns
Section titled “Returns”AppKitChildProcess
Accessors
Section titled “Accessors”process
Section titled “process”Get Signature
Section titled “Get Signature”get process():
ChildProcessResult|undefined
Current child handle, or undefined when no child is running.
Returns
Section titled “Returns”ChildProcessResult | undefined
running
Section titled “running”Get Signature
Section titled “Get Signature”get running():
boolean
Whether the current child has not reported an exit code or signal.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”run(
options?):Promise<ExecResult>
Start, await, and shut down one foreground child while preserving parent termination signals.
Parameters
Section titled “Parameters”options?
Section titled “options?”AppKitChildProcessRunOptions = {}
Returns
Section titled “Returns”Promise<ExecResult>
shutdown()
Section titled “shutdown()”shutdown(
signal?):Promise<void>
Abort readiness and stop the process tree once.
An explicit non-SIGKILL signal runs only the graceful polling phase.
Explicit SIGKILL skips directly to forced polling. Omitting the signal
uses the configured graceful and forced policy.
Parameters
Section titled “Parameters”signal?
Section titled “signal?”Signals
Returns
Section titled “Returns”Promise<void>
start()
Section titled “start()”start():
Promise<void>
Spawn the child and resolve only after its optional readiness probe succeeds.
Returns
Section titled “Returns”Promise<void>