You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/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();
}
}
The text was updated successfully, but these errors were encountered:
以下のテストが、run ls の時点で落ちる。
The text was updated successfully, but these errors were encountered: