Lines Matching refs:pid
61 struct pid { struct
62 SLIST_ENTRY(pid) next;
64 pid_t pid; member
67 static SLIST_HEAD(, pid) pidlist = SLIST_HEAD_INITIALIZER(pidlist); argument
80 struct pid *cur, *p; in auto_popen()
81 pid_t pid; in auto_popen() local
93 cur = malloc(sizeof(struct pid)); in auto_popen()
115 switch (pid = fork()) { in auto_popen()
134 log_debugx("executing \"%s\" as pid %d", command, pid); in auto_popen()
142 cur->pid = pid; in auto_popen()
151 struct pid *cur, *last = NULL; in auto_pclose()
153 pid_t pid; in auto_pclose() local
174 pid = wait4(cur->pid, &status, 0, NULL); in auto_pclose()
175 } while (pid == -1 && errno == EINTR); in auto_pclose()
179 cur->command, pid, WTERMSIG(status)); in auto_pclose()
185 cur->command, pid, WEXITSTATUS(status)); in auto_pclose()
189 log_debugx("\"%s\", pid %d, terminated gracefully", cur->command, pid); in auto_pclose()
194 return (pid == -1 ? -1 : status); in auto_pclose()