method bind-stderr

Documentation for method bind-stderr assembled from the following types:

class Proc::Async

From Proc::Async

(Proc::Async) method bind-stderr

method bind-stderr(IO::Handle:D $handle)

Redirects STDERR of the target process to a handle (which must be opened). If STDERR is closed X::Proc::Async::BindOrUse will be thrown.

my $p = Proc::Async.new("ls""--foo":err);
my $h = "ls.err".IO.open(:w);
$p.bind-stderr($h);
$p.start;