start(); /* send to stdin */ $process->getStdin()->write("abc\n"); echo yield new Message($process->getStdout()); $code = yield $process->join(); echo "Process exited with {$code}.\n"; });