See Original text in context
method stdout(Proc::Async: : --> Supply)
Returns the Supply for the external program's standard output stream. If :bin
is passed, the standard output is passed along in binary as Blob, otherwise it is interpreted as UTF-8, decoded, and passed along as Str.
my = Proc::Async.new(:r, 'echo', 'Raku');.stdout.tap( ->);my = .start;await ;
You must call stdout
before you call .start
. Otherwise an exception of class X::Proc::Async::TapBeforeSpawn is thrown.
If stdout
is not called, the external program's standard output is not captured at all.
Note that you cannot call stdout
both with and without :bin
on the same object; it will throw an exception of type X::Proc::Async::CharsOrBytes if you try.
Use .Supply
for merged STDOUT and STDERR.