siginfo_t        res;
int              res;
XPGetDocStatus XpuWaitForPrintFileChild( void *handle ){  MyPrintFileData *mpfd   = (MyPrintFileData *)handle;  siginfo_t        res;  XPGetDocStatus   status = XPGetDocError; /* used when read() from pipe fails */    if( XPU_TRACE(waitid(P_PID, mpfd->pid, &res, WEXITED)) == -1 )    perror("XpuWaitForPrintFileChild: waitid failure");  /* read the status from the child */   if( read(mpfd->pipe[0], &status, sizeof(XPGetDocStatus)) != sizeof(XPGetDocStatus) )  {    perror("XpuWaitForPrintFileChild: can't read XPGetDocStatus");  }      close(mpfd->pipe[0]);      free(handle);    XPU_DEBUG_ONLY(PrintXPGetDocStatus(status));  return(status);}