+ if (wpid > 0) {
+ if (WIFEXITED(chldstatus)) { /* process exit()ed */
+ stat = WEXITSTATUS(chldstatus);
+ Dmsg1(200, "status =%d\n", stat);
+ } else if (WIFSIGNALED(chldstatus)) { /* process died */
+ stat = 1;
+ Dmsg0(200, "Signaled\n");
+ }
+ if (stat != 0) {
+ errno = ECHILD; /* set child errno */
+ }
+ }