summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-03-02 14:48:32 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-03-02 14:48:32 +0000
commit373d796d957480b4e429aa94a992f793197346d4 (patch)
treeeb5db47d04e01a3d97f6ae465640f1bf2d5b923b /usr.bin
parent922315899db29437a4c8d6148d28b12ea521a342 (diff)
If a non-gz manual is read after a gzipped manual, refrain
from throwing a bogus error "wait: No child processes". As reported by Baptiste Daroussin <bapt at FreeBSD dot org>, clearing the state variable curp->child after use was forgotten.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c
index 85f1238bbaa..19878cfc331 100644
--- a/usr.bin/mandoc/read.c
+++ b/usr.bin/mandoc/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.103 2015/02/23 13:30:02 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.104 2015/03/02 14:48:31 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -846,6 +846,7 @@ mparse_wait(struct mparse *curp)
perror("wait");
exit((int)MANDOCLEVEL_SYSERR);
}
+ curp->child = 0;
if (WIFSIGNALED(status)) {
mandoc_vmsg(MANDOCERR_FILE, curp, 0, 0,
"gunzip died from signal %d", WTERMSIG(status));