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