xwait
static pid_t xwait(int block, int *status);
while ((pid = xwait(waitall || pids_full(), &status)) > 0) {