Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created July 19, 2016 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/e3a8b404163d63fcc7a89dd2f8e54f39 to your computer and use it in GitHub Desktop.
Save zoffixznet/e3a8b404163d63fcc7a89dd2f8e54f39 to your computer and use it in GitHub Desktop.
my $p = Proc::Async.new: './perl6', '-e', 'exit 255';
my ($stdout, $stderr) = '', '';
$p.stdout.tap: $stdout ~= *;
$p.stderr.tap: $stderr ~= *;
try await $p.start;
put "OUT: `$stdout`\n\nERR: `$stderr`";
# The spawned process exited unsuccessfully (exit code: 255)
# in block <unit> at /home/zoffix/bin/streams.p6 line 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment