Lines Matching refs:cur
83 struct pid *cur, *p;
96 cur = malloc(sizeof(struct pid));
97 if (cur == NULL)
116 cur->command = checked_strdup(command);
140 cur->outfp = fdopen(outfds[0], "r");
145 cur->pid = pid;
146 SLIST_INSERT_HEAD(&pidlist, cur, next);
148 return cur->outfp;
154 struct pid *cur, *last = NULL;
161 SLIST_FOREACH(cur, &pidlist, next) {
162 if (cur->outfp == iop)
164 last = cur;
166 if (cur == NULL) {
174 fclose(cur->outfp);
177 pid = wait4(cur->pid, &status, 0, NULL);
182 cur->command, pid, WTERMSIG(status));
188 cur->command, pid, WEXITSTATUS(status));
192 log_debugx("\"%s\", pid %d, terminated gracefully", cur->command, pid);
194 free(cur->command);
195 free(cur);