spawn_restartable.ts view source
(program: SpawnProgram, args?: readonly string[], options?: SpawnStartOptions | undefined): Promise<SpawnRestartable> import {spawn_restartable} from '@fuzdev/gro/spawn_restartable.js'; Starts a child that can be restarted, resolving once the first child is running.
Library code over a program, so the caller decides the program and its environment.
args and options are copied once, here, so every start uses them as they were at this
call, and a caller changing its array or options object afterward has no effect.
program
the executable, its pin and environment fixed for every restart
args?
the arguments after argv[0], copied now
readonly string[][]options?
the options of every start, stdio included, stdio inherited by default,
copied now, with signal kept so an abort still stops a child
returns
Promise<SpawnRestartable>
the restartable child, frozen and null-prototype
throws
SpawnError- `launch_failed`, as `SpawnProgram.start` does