932b4fe022a4a0009d6ce2382dc24d2172d08f99 kent Fri Sep 5 17:04:54 2014 -0700 Adding new pipelineClose() function that combines pipelineWait and pipelineFree and applying it where it makes sense, in some cases fixing non-symptomatic bugs from missing pipelineWaits diff --git src/lib/linefile.c src/lib/linefile.c index 954cde3..5416c24 100644 --- src/lib/linefile.c +++ src/lib/linefile.c @@ -673,32 +673,31 @@ /* Fetch next line from file. Squawk and die if it's not there. */ { if (!lineFileNext(lf, retStart, retSize)) lineFileUnexpectedEnd(lf); } void lineFileClose(struct lineFile **pLf) /* Close up a line file. */ { struct lineFile *lf; if ((lf = *pLf) != NULL) { struct pipeline *pl = lf->pl; if (pl != NULL) { - pipelineWait(pl); - pipelineFree(&lf->pl); + pipelineClose(&lf->pl); } else if (lf->fd > 0 && lf->fd != fileno(stdin)) { close(lf->fd); freeMem(lf->buf); } #ifdef USE_TABIX else if (lf->tabix != NULL) { if (lf->tabixIter != NULL) ti_iter_destroy(lf->tabixIter); ti_close(lf->tabix); } #endif // USE_TABIX else if (lf->udcFile != NULL)