Lines Matching full:pid

40  * PID and process name for local clients, that are likely to be
77 * Try to determine a PID for a client from its connection
79 * connected, use GetClientPid to determine the PID at other times.
83 * @return PID of the client. Error (-1) if PID can't be determined
92 pid_t pid = -1; in DetermineClientPid() local
95 return pid; in DetermineClientPid()
102 pid = lcc->pid; in DetermineClientPid()
106 return pid; in DetermineClientPid()
111 * PID. Note that mapping PID to a command hasn't been implemented for
116 * @param[in] pid Process ID of a client.
131 DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) in DetermineClientCmd() argument
142 if (pid == -1) in DetermineClientCmd()
158 kp = kvm_getprocs(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), in DetermineClientCmd()
178 #else /* Linux using /proc/pid/cmdline */ in DetermineClientCmd()
180 /* Check if /proc/pid/cmdline exists. It's not supported on all in DetermineClientCmd()
182 if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0) in DetermineClientCmd()
192 /* Read the contents of /proc/pid/cmdline. It should contain the in DetermineClientCmd()
230 /* Solaris prior to 11.3.5 does not support /proc/pid/cmdline, but in DetermineClientCmd()
232 * structure in the /proc/pid/psinfo file. */ in DetermineClientCmd()
233 if (snprintf(path, sizeof(path), "/proc/%d/psinfo", pid) < 0) in DetermineClientCmd()
287 client->clientIds->pid = DetermineClientPid(client); in ReserveClientIds()
288 if (client->clientIds->pid != -1) in ReserveClientIds()
289 DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, in ReserveClientIds()
292 DebugF("client(%lx): Reserved pid(%d).\n", in ReserveClientIds()
293 (unsigned long) client->clientAsMask, client->clientIds->pid); in ReserveClientIds()
317 DebugF("client(%lx): Released pid(%d).\n", in ReleaseClientIds()
318 (unsigned long) client->clientAsMask, client->clientIds->pid); in ReleaseClientIds()
332 * Get cached PID of a client.
334 * param[in] client Client whose PID has been already cached.
336 * @return Cached client PID. Error (-1) if called:
352 return client->clientIds->pid; in GetClientPid()
365 * - on OS that doesn't support mapping of PID to command line
391 * - on OS that doesn't support mapping of PID to command line