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/hg/makeDb/hgLoadPsl/hgLoadPsl.c src/hg/makeDb/hgLoadPsl/hgLoadPsl.c index c0728d8..157c7de 100644 --- src/hg/makeDb/hgLoadPsl/hgLoadPsl.c +++ src/hg/makeDb/hgLoadPsl/hgLoadPsl.c @@ -124,65 +124,65 @@ static char *sortBinCmd[] = {"sort", "-k15,15", "-k17n,17n", NULL}; static char **outPipeBin[] = {sortBinCmd, NULL}; void copyPslToTab(char *pslFile, char *tabFile) /* copy a single PSL to the tab file */ { struct psl *psl; struct lineFile *lf = pslFileOpen(pslFile); struct pipeline *pl = NULL; FILE *tabFh = NULL; if (noSort) tabFh = mustOpen(tabFile, "w"); else { if (pslCreateOpts & PSL_WITH_BIN) - pl = pipelineOpen(outPipeBin, pipelineWrite, tabFile, NULL); + pl = pipelineOpen(outPipeBin, pipelineWrite, tabFile, NULL, 0); else - pl = pipelineOpen(outPipeNoBin, pipelineWrite, tabFile, NULL); + pl = pipelineOpen(outPipeNoBin, pipelineWrite, tabFile, NULL, 0); tabFh = pipelineFile(pl); } while ((psl = pslNext(lf)) != NULL) { if (pslCreateOpts & PSL_WITH_BIN) fprintf(tabFh, "%u\t", hFindBin(psl->tStart, psl->tEnd)); pslTabOut(psl, tabFh); pslFree(&psl); } lineFileClose(&lf); if (noSort) carefulClose(&tabFh); else pipelineClose(&pl); } void copyPslXaToTab(char *pslFile, char *tabFile) /* copy a single PSL XA to the tab file */ { struct xAli *xa; char *row[23]; struct lineFile *lf = lineFileOpen(pslFile, TRUE); struct pipeline *pl = NULL; FILE *tabFh = NULL; if (noSort) tabFh = mustOpen(tabFile, "w"); else { if (pslCreateOpts & PSL_WITH_BIN) - pl = pipelineOpen(outPipeBin, pipelineWrite, tabFile, NULL); + pl = pipelineOpen(outPipeBin, pipelineWrite, tabFile, NULL, 0); else - pl = pipelineOpen(outPipeNoBin, pipelineWrite, tabFile, NULL); + pl = pipelineOpen(outPipeNoBin, pipelineWrite, tabFile, NULL, 0); tabFh = pipelineFile(pl); } while (lineFileRow(lf, row)) { xa = xAliLoad(row); if (pslCreateOpts & PSL_WITH_BIN) fprintf(tabFh, "%u\t", hFindBin(xa->tStart, xa->tEnd)); xAliTabOut(xa, tabFh); xAliFree(&xa); } lineFileClose(&lf); if (noSort) carefulClose(&tabFh); else pipelineClose(&pl);