Skip Menu |
Report information
Id: 126277
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: tokuhirom <tokuhirom [at]>

Severity: (no value)
Tag: (no value)
Platform: MacOS X
Patch Status: (no value)
VM: (no value)

Subject: IO::Socket::Async + `run` exits unexpectedly on mac
Download (untitled) / with headers
text/plain 1.3k
When call `run` method in IO:Socket::Async.listen routine, perl6-m exits unexpectedly on Mac OS X. Following test code pass on linux. But it fails on linux. ``` #!/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 'TERM', $pid; waitpid $pid, 0; } elsif ($pid == 0) { say 'executing server'; exec 'perl6-m', '-e', <<'EOF'; use v6; sub MAIN($port=5000) { react { whenever IO::Socket::Async.listen('', $port) -> $conn { run 'ls'; # process exits at here. await $conn.print("yo\n"); $conn.close(); } } } EOF } else { die 'fork failed'; } done_testing; ``` output on linux: ``` sleep executing server connect foo.pl6 projects.json ok 1 1..1 ``` output on mac: ``` sleep executing server connect LICENSE META6.json bin eg lib server.pl6 t not ok 1 # Failed test at line 21. # got: undef # expected: 'yo # ' 1..1 # Looks like you failed 1 test of 1. ``` Version is: ``` This is perl6 version 2015.09-210-gef814c3 built on MoarVM version 2015.09-39-g1434283 ```

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at