ProPuke
ProPuke
DDeno
Created by ProPuke on 5/4/2024 in #help
Piping stdout from a ChildProcess while it's running
Is it possible in Deno to read from a ChildProcess's stdout while it is running (before it has completed)? I'm using deno.Command and .spawn() to create a ChildProcess.
If I then try reading from process.stdout.getReader() it does not return anything until the process has terminated and an output status is returned. If I try reading direct from process.stdout I get the printed warning "Can't collect output because stdout is locked". (my bad, this was called from later calling output() instead of awaiting status) Is it possible to read from a ChildProcess stdout while it is interactively running?
9 replies