Created
October 5, 2015 15:36
-
-
Save tokuhirom/8857403966928be2b118 to your computer and use it in GitHub Desktop.
io-server-async and run on mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
sub MAIN($port=5000) { | |
react { | |
whenever IO::Socket::Async.listen('127.0.0.1', $port) -> $conn { | |
run 'ls'; # process exits at here. | |
await $conn.print("yo"); | |
$conn.close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script exits at 'run' method on mac.
It returns "yo" on linux.