Skip to content

Commit

Permalink
Don't recommend code that does not work
Browse files Browse the repository at this point in the history
Please revert once RT #132016 is resolved.
  • Loading branch information
AlexDaniel committed Sep 2, 2017
1 parent f81802d commit 7008429
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/Type/Proc/Async.pod6
Expand Up @@ -14,6 +14,10 @@ moment.
C<Proc::Async> allows you to run external commands asynchronously, capturing
standard output and error handles, and optionally write to its standard input.
=begin comment
⚠ Revert the commit mentioned in RT #132016 once it is resolved
=end comment
my $file = ‘foo’.IO;
spurt $file, “and\nCamelia\n♡\nme\n”;
Expand All @@ -34,11 +38,11 @@ standard output and error handles, and optionally write to its standard input.
whenever $proc.print: “I\n♥\nCamelia\n” {
$proc.close-stdin
}
whenever signal(SIGTERM).merge: signal(SIGINT) {
whenever signal(SIGTERM) {
once {
say ‘Signal received, asking the process to stop’;
$proc.kill; # send SIGHUP
whenever signal($_).zip: Promise.in(2).Supply {
whenever signal($_) {
say ‘Kill it!’;
$proc.kill: SIGKILL
}
Expand Down

0 comments on commit 7008429

Please sign in to comment.