6f949e90b1ba3de976455fbcf9da21897761d134
markd
  Fri Oct 29 16:11:58 2021 -0700
add timeout option to pipeline to allow kill long-running pipelines, especially ones run from CGIs

diff --git src/lib/textOut.c src/lib/textOut.c
index f261ebb..75443a5 100644
--- src/lib/textOut.c
+++ src/lib/textOut.c
@@ -149,31 +149,31 @@
 	printf("Content-Type: application/x-%s\n", compressType);
 	if (endsWith(fileName, suffix))
 	    printf("Content-Disposition: attachment; filename=%s\n\n", fileName);
 	else
 	    printf("Content-Disposition: attachment; filename=%s%s\n\n",
 		   fileName, suffix);
 	/* Send the Content header uncompressed! */
 	fflush(stdout);
 	}
 
     /* Make sure no environment variables interfere with compressor. */
     cleanEnvVars(compressType);
 
     /* Redirect stdout to compressor pipeline object. */
     compressPipeline = pipelineOpen1(getCompressor(compressType),
-				     pipelineWrite, NULL, NULL);
+				     pipelineWrite, NULL, NULL, 0);
     if (-1 == dup2(pipelineFd(compressPipeline), STDOUT_FILENO))
 	errnoAbort("dup2(pipelineFd %d, stdout %d) failed in textOpen()",
 		   pipelineFd(compressPipeline), STDOUT_FILENO);
     }
 pushWarnHandler(textOutWarnHandler);
 pushAbortHandler(textOutAbortHandler);
 return(compressPipeline);
 }
 
 void textOutClose(struct pipeline **pCompressPipeline, int *saveStdout)
 /* Flush and close stdout, wait for the pipeline to finish, and then free 
  * the pipeline object. */
 {
 if (pCompressPipeline && *pCompressPipeline)
     {