Lines Matching defs:pid
54 open_usage(pid_t pid, int *perr)
60 (void) snprintf(path, sizeof (path), "/proc/%d/usage", (int)pid);
79 proc_usage(pid_t pid, prusage_t *pup, int *perr)
85 if ((fd = open_usage(pid, perr)) != -1) {
101 * Force the parent process (ppid) to wait for its child process (pid).
110 pid_t pid, ppid;
115 * get the specified pid and the psinfo struct
117 if ((pid = proc_arg_psinfo(arg, PR_ARG_PIDS, &psinfo, &gret)) == -1) {
125 command, (int)pid);
136 (int)pid);
140 if (proc_usage(pid, &usage, &gret) == 0) {
144 command, (int)pid, Pgrab_error(gret));
150 "defunct less than %d seconds\n", command, (int)pid,
165 (int)pid);
182 if (pr_waitid(Pr, P_PID, pid, &siginfo, WEXITED|WNOHANG) != 0) {
194 print_exit_status(pid_t pid, int wstat)
196 (void) printf("%d: ", (int)pid);
241 (void) fprintf(stderr, "usage: %s pid ...\n", command);
259 pid_t pid;
262 retc += r = reap(*argv++, &pid, &wstat);
265 print_exit_status(pid, wstat);