-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
以下のテストが、run ls の時点で落ちる。
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.010000;
use autodie;
use Test::More;
use IO::Socket::INET;
my $pid = fork();
if ($pid > 0) { # parent
say 'sleep';
sleep 3;
say 'connect';
my $sock = IO::Socket::INET->new(PeerAddr => 'localhost:5000');
$sock or die;
my $msg = <$sock>;
is $msg, "yo\n";
kill $pid;
waitpid $pid, 0;
} elsif ($pid == 0) {
say 'executing server';
exec 'perl6-m', 'server.pl6';
} else {
die 'fork failed';
}
done_testing;
use v6;
say 'spawned sever';
react {
whenever IO::Socket::Async.listen('127.0.0.1', 5000) -> $conn {
run 'ls';
await $conn.print("yo\n");
$conn.close();
}
}
Metadata
Metadata
Assignees
Labels
No labels