Skip to content

Instantly share code, notes, and snippets.

@tokuhirom
Created October 5, 2015 15:36
Show Gist options
  • Save tokuhirom/8857403966928be2b118 to your computer and use it in GitHub Desktop.
Save tokuhirom/8857403966928be2b118 to your computer and use it in GitHub Desktop.
io-server-async and run on mac
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();
}
}
}
@tokuhirom
Copy link
Author

This script exits at 'run' method on mac.
It returns "yo" on linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment