Accumulates line-buffered output from a Cockpit process into a lines array.
The caller supplies a startProcess factory that receives a launch callback.
Call launch(proc) synchronously once the process is ready — this avoids the
JS Promise "following" behaviour that occurs when a CockpitProcess (which extends
Promise) is returned from inside a .then().
The deps array works like useEffect deps — the hook tears down and restarts
the process whenever any dep changes.
Accumulates line-buffered output from a Cockpit process into a
linesarray.The caller supplies a
startProcessfactory that receives alaunchcallback. Calllaunch(proc)synchronously once the process is ready — this avoids the JS Promise "following" behaviour that occurs when aCockpitProcess(which extendsPromise) is returned from inside a.then().The
depsarray works likeuseEffectdeps — the hook tears down and restarts the process whenever any dep changes.