Skip to content

Commit

Permalink
Add fragile workarounds for signal issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDaniel committed May 31, 2018
1 parent f307872 commit 2be293f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/Whateverable.pm6
Expand Up @@ -377,7 +377,10 @@ sub test-delay {
use NativeCall;
sub kill(int32, int32) is native {*};
sub getppid(--> int32) is native {*};
kill getppid, 10; # SIGUSR1
my $sig-compat = SIGUSR1;
# ↓ Fragile platform-specific hack
$sig-compat = 10 if $*PERL.compiler.version ≤ v2018.05;
kill getppid, +$sig-compat; # SIGUSR1
}

sub run-smth($full-commit-hash, $code, :$backend=rakudo-moar) is export {
Expand Down
6 changes: 5 additions & 1 deletion t/lib/Testable.pm6
Expand Up @@ -22,7 +22,11 @@ class Testable {
$!bot = $bot;
my $ready = Channel.new;
$!messages = Channel.new;
$!delay-channel = signal(SIGUSR1).Channel;

my $sig-compat = SIGUSR1;
# ↓ Fragile platform-specific hack
$sig-compat = SIGBUS if v2018.04 ≤ $*PERL.compiler.version ≤ v2018.05;
$!delay-channel = signal($sig-compat).Channel;

use Whateverable::Builds;
ensure-cloned-repos;
Expand Down

0 comments on commit 2be293f

Please sign in to comment.