-enum mandoclevel
-mparse_wait(struct mparse *curp, pid_t child_pid)
-{
- int status;
-
- if (waitpid(child_pid, &status, 0) == -1) {
- mandoc_msg(MANDOCERR_SYSWAIT, curp, 0, 0,
- strerror(errno));
- curp->file_status = MANDOCLEVEL_SYSERR;
- return(curp->file_status);
- }
- if (WIFSIGNALED(status)) {
- mandoc_vmsg(MANDOCERR_SYSSIG, curp, 0, 0,
- "%d", WTERMSIG(status));
- curp->file_status = MANDOCLEVEL_SYSERR;
- return(curp->file_status);
- }
- if (WEXITSTATUS(status)) {
- mandoc_vmsg(MANDOCERR_SYSEXIT, curp, 0, 0,
- "%d", WEXITSTATUS(status));
- curp->file_status = MANDOCLEVEL_SYSERR;
- return(curp->file_status);
- }
- return(MANDOCLEVEL_OK);
+ mandoc_msg(MANDOCERR_FILE, curp, 0, 0, strerror(errno));
+ return MANDOCLEVEL_ERROR;