Lines Matching refs:pid
45 pid_t pid; member
51 pid_t pid; member
100 pid_t pid; in Popen() local
117 pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); in Popen()
118 if (pid < 0) { in Popen()
125 register_file(fp, 1, pid); in Popen()
159 register_file(FILE *fp, int pipe, pid_t pid) in register_file() argument
167 fpp->pid = pid; in register_file()
194 return (p->pid); in file_pid()
210 pid_t pid; in start_commandv() local
212 if ((pid = fork()) < 0) { in start_commandv()
216 if (pid == 0) { in start_commandv()
228 return (pid); in start_commandv()
234 pid_t pid; in run_command() local
238 pid = start_commandv(cmd, nset, infd, outfd, args); in run_command()
240 if (pid < 0) in run_command()
242 return wait_command(pid); in run_command()
281 wait_command(pid_t pid) in wait_command() argument
284 if (wait_child(pid) < 0) { in wait_command()
292 findchild(pid_t pid, int dont_alloc) in findchild() argument
296 for (cpp = &child; *cpp != NULL && (*cpp)->pid != pid; in findchild()
310 (*cpp)->pid = pid; in findchild()
333 pid_t pid; in sigchild() local
339 while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { in sigchild()
340 cp = findchild(pid, 1); in sigchild()
359 wait_child(pid_t pid) in wait_child() argument
373 cp = findchild(pid, 1); in wait_child()
375 rv = waitpid(pid, &wait_status, 0); in wait_child()
391 free_child(pid_t pid) in free_child() argument
399 if ((cp = findchild(pid, 0)) != NULL) { in free_child()