See Original text in context
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.