Documentation for method bind-stdout
assembled from the following pages:
Class: Proc::Async §
From Proc::Async
(Proc::Async) method bind-stdout §
method bind-stdout(IO::Handle )
Redirects STDOUT of the target process to a handle (which must be opened). If STDOUT is closed X::Proc::Async::BindOrUse will be thrown.
my = Proc::Async.new("ls", :out);my = "ls.out".IO.open(:w);.bind-stdout();.start;
This program will pipe the output of the ls
shell command to a file called ls.out
, which we are opened for reading.