e63e8e4ebaba9f43a6a65f02ee13adf32d7f287b kent Thu Jul 25 13:19:47 2013 -0700 Made it so linefile on gzipped files doesn't abort with an error message if you close it before reading it all. diff --git src/lib/pipeline.c src/lib/pipeline.c index 9a0a936..d562a8f 100644 --- src/lib/pipeline.c +++ src/lib/pipeline.c @@ -661,30 +661,37 @@ errAbort("close failed on pipeline: %s ", pl->procName); } pl->pipeFd = -1; } int pipelineWait(struct pipeline *pl) /* Wait for processes in a pipeline to complete; normally aborts if any * process exists non-zero. If pipelineNoAbort was specified, return the exit * code of the first process exit non-zero, or zero if none failed. */ { /* must close before waiting to so processes get pipe EOF */ closePipeline(pl); return groupLeaderWait(pl); } +void pipelineSetNoAbort(struct pipeline *pl) +/* Make it so pipeline won't abort on error - can be done after the fact. + * (This is needed to close a pipelined lineFile early.) */ +{ +pl->options |= pipelineNoAbort; +} + void pipelineDumpCmds(char ***cmds) /* Dump out pipeline-formatted commands to stdout for debugging. */ { char **cmd; boolean first = TRUE; while ((cmd = *cmds++) != NULL) { char *word; if (first) first = FALSE; else printf("| "); while ((word = *cmd++) != NULL) printf("%s ", word); }