Lines Matching refs:chp
2131 struct subprocess *chp; local
2135 chp = (struct subprocess *) malloc(sizeof(struct subprocess));
2136 if (chp == NULL) {
2139 chp->pid = pid;
2140 chp->prog = prog;
2141 chp->done = done;
2142 chp->arg = arg;
2143 chp->next = children;
2144 children = chp;
2159 struct subprocess *chp, **prevp; local
2177 for (prevp = &children; (chp = *prevp) != NULL;
2178 prevp = &chp->next) {
2179 if (chp->pid == pid) {
2181 *prevp = chp->next;
2188 (chp != NULL ? chp->prog : "??"), pid,
2193 (chp != NULL ? chp->prog: "??"), pid,
2196 if ((chp != NULL) && (chp->done != NULL))
2197 (*chp->done)(chp->arg, status);
2198 if (chp != NULL)
2199 free(chp);
2213 struct subprocess *chp; local
2217 for (chp = children; chp != NULL; chp = chp->next)
2218 (void) kill(chp->pid, runcount == 0 ? SIGTERM : SIGKILL);
2234 struct subprocess *chp; in final_reap() local
2238 for (chp = children; chp != NULL; chp = chp->next) in final_reap()
2239 dbglog(" pid %d: %s", chp->pid, chp->prog); in final_reap()