(sometimes) detect that the CGI process had terminated, before reading all the data from the stdout pipe.