summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-26 21:40:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-26 21:40:17 +0000
commita7d7f08f9bf1378002063e44fe9ce8a27a886eed (patch)
tree0634189e33baee57f5507e69c97479bb570c25f6 /mandocdb.c
parent3270470c52b9d9f79faaba63eabc57ed8bfbb776 (diff)
downloadmandoc-a7d7f08f9bf1378002063e44fe9ce8a27a886eed.tar.gz
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c7
1 files changed, 2 insertions, 5 deletions
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");
}