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/psGfx.c src/lib/psGfx.c
index 79e2c2d..d613a95 100644
--- src/lib/psGfx.c
+++ src/lib/psGfx.c
@@ -462,23 +462,23 @@
 	chopLine(line, words);
 	width = atof(words[3]);
 	height = atof(words[4]);
 	break;
 	}
     }
 lineFileClose(&lf);
 	
 /* Do conversion. */
 chopSuffix(pdfTmpName);
 pdfName = addSuffix(pdfTmpName, ".pdf");
 char widthBuff[1024], heightBuff[1024];
 safef(widthBuff, sizeof widthBuff, "-dDEVICEWIDTHPOINTS=%d", round(width));
 safef(heightBuff, sizeof heightBuff, "-dDEVICEHEIGHTPOINTS=%d", round(height));
 char *pipeCmd[] = { "ps2pdf", widthBuff, heightBuff, epsFile, pdfName, NULL } ;
-struct pipeline *pl = pipelineOpen1(pipeCmd, pipelineWrite, "/dev/null", NULL);
+struct pipeline *pl = pipelineOpen1(pipeCmd, pipelineWrite, "/dev/null", NULL, 0);
 sysVal = pipelineWait(pl);
 if(sysVal != 0)
     freez(&pdfName);
 freez(&pdfTmpName);
 return pdfName;
 }