From a7d7f08f9bf1378002063e44fe9ce8a27a886eed Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 26 Nov 2014 21:40:17 +0000 Subject: Simplify the mparse_open()/mparse_wait() interface. Don't bother the user with the PID of the child process, store it inside the opaque mparse handle. --- mandocdb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index 2ed78b34..085a7db3 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1084,7 +1084,6 @@ mpages_merge(struct mchars *mc, struct mparse *mp) struct man *man; char *sodest; char *cp; - pid_t child_pid; int fd; unsigned int pslot; enum mandoclevel lvl; @@ -1112,9 +1111,8 @@ mpages_merge(struct mchars *mc, struct mparse *mp) mdoc = NULL; man = NULL; sodest = NULL; - child_pid = 0; - mparse_open(mp, &fd, mpage->mlinks->file, &child_pid); + mparse_open(mp, &fd, mpage->mlinks->file); if (fd == -1) { say(mpage->mlinks->file, "&open"); goto nextpage; @@ -1231,8 +1229,7 @@ mpages_merge(struct mchars *mc, struct mparse *mp) dbadd(mpage, mc); nextpage: - if (child_pid && - mparse_wait(mp, child_pid) != MANDOCLEVEL_OK) { + if (mparse_wait(mp) != MANDOCLEVEL_OK) { exitcode = (int)MANDOCLEVEL_SYSERR; say(mpage->mlinks->file, "&wait gunzip"); } -- cgit