Skip to content

Commit

Permalink
Test Proc::Async.kill doesn't hang
Browse files Browse the repository at this point in the history
If killing immediately after .start

RT#125653: https://rt.perl.org/Ticket/Display.html?id=125653
  • Loading branch information
zoffixznet committed Oct 13, 2017
1 parent 522e3da commit 2a45053
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S17-procasync/kill.t
Expand Up @@ -9,7 +9,7 @@ try {
}

my @signals = SIGINT;
plan 1 + @signals * 10;
plan 2 + @signals * 10;

my $program = 'async-kill-tester';

Expand Down Expand Up @@ -77,6 +77,15 @@ doesn't-hang 「
, :out('All done!'), :err(''), :10wait,
'.kill kills when multi-procs kill in multi-promises';

# RT #125653
subtest 'can rapid-kill our Proc::Async without hanging' => {
plan 1;
my $proc = Proc::Async.new: $*EXECUTABLE, "-e", "sleep 1";
my $prom = $proc.start;
$proc.kill;
await $prom;
pass 'did not hang';
}

END {
unlink $program;
Expand Down

0 comments on commit 2a45053

Please sign in to comment.