Wait for Child to Exit After STDIN Closes