Lines Matching refs:chp
2128 struct subprocess *chp; local
2132 chp = (struct subprocess *) malloc(sizeof(struct subprocess));
2133 if (chp == NULL) {
2136 chp->pid = pid;
2137 chp->prog = prog;
2138 chp->done = done;
2139 chp->arg = arg;
2140 chp->next = children;
2141 children = chp;
2156 struct subprocess *chp, **prevp; local
2174 for (prevp = &children; (chp = *prevp) != NULL;
2175 prevp = &chp->next) {
2176 if (chp->pid == pid) {
2178 *prevp = chp->next;
2185 (chp != NULL ? chp->prog : "??"), pid,
2190 (chp != NULL ? chp->prog: "??"), pid,
2193 if ((chp != NULL) && (chp->done != NULL))
2194 (*chp->done)(chp->arg, status);
2195 if (chp != NULL)
2196 free(chp);
2210 struct subprocess *chp; local
2214 for (chp = children; chp != NULL; chp = chp->next)
2215 (void) kill(chp->pid, runcount == 0 ? SIGTERM : SIGKILL);
2231 struct subprocess *chp; in final_reap() local
2235 for (chp = children; chp != NULL; chp = chp->next) in final_reap()
2236 dbglog(" pid %d: %s", chp->pid, chp->prog); in final_reap()