Wait for and print process output.