DenoDDeno
Powered by
ProPukeP
Denoβ€’2y agoβ€’
8 replies
ProPuke

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
deno.Command
and
.spawn()
.spawn()
to create a
ChildProcess
ChildProcess
.
If I then try reading from
process.stdout.getReader()
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
process.stdout
I get the printed warning "Can't collect output because stdout is locked".

(my bad, this was called from later calling
output()
output()
instead of awaiting
status
status
)

Is it possible to read from a ChildProcess stdout while it is interactively running?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Log output from Deno.ChildProcess while its running
KayKKay / help
2y ago
Deno Subprocess piping is slow when piping large data between processes
phoenisxPphoenisx / help
4y ago