Lines Matching defs:pid

13    the pid of that matched process.
65 printf (" defaulting to the highest-pid one, %d\n", highest_pid);
70 /* Given a pid, get the full executable name (including directory
77 get_process_name_for_pid (pid_t pid)
80 if (proc_pidpath (pid, tmp_name, sizeof (tmp_name)) == 0)
82 printf ("Could not find process with pid of %d\n", (int) pid);
91 /* Get a struct kinfo_proc structure for a given pid.
98 get_kinfo_proc_for_pid (pid_t pid, const char *process_name)
101 int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };
106 printf ("Could not get kinfo_proc for pid %d\n", (int) pid);
255 get_proc_threadinfo (pid_t pid, uint64_t thread_handle, struct proc_threadinfo *pth)
258 int ret = proc_pidinfo (pid, PROC_PIDTHREADINFO, thread_handle,
272 pid_t pid = 0;
282 printf ("Usage: tdump [-l] [-v] [-r] pid/procname\n");
304 printf ("Usage: tdump [-l] [-v] pid/procname\n");
320 pid = get_pid_for_process_name (procname);
325 pid = (pid_t) strtol (argv[argc - 1], NULL, 10);
326 if (pid == 0 && errno == EINVAL)
328 printf ("Usage: tdump [-l] [-v] pid/procname\n");
333 const char *process_name = get_process_name_for_pid (pid);
335 // At this point "pid" is the process id and "process_name" is the process name
339 struct kinfo_proc *kinfo = get_kinfo_proc_for_pid (pid, process_name);
341 printf ("pid %d (%s) is currently ", pid, process_name);
356 kr = task_for_pid (mach_task_self (), pid, &task);
393 printf ("pid %d has %d threads\n", pid, thread_count);
431 int proc_threadinfo_succeeded = get_proc_threadinfo (pid, identifier_info.thread_handle, &pth);