Lines Matching defs:pid
56 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid)
63 pid);
66 static int initCtx(uid_t uid, int pid, struct ctx *ctx)
70 convertUidPidToPath(path, sizeof(path), uid, pid);
135 long pid = strtol(ctx->buf_ptr, &pid_eptr, 10);
146 return (pid_t)pid;
149 static int removeProcessGroup(uid_t uid, int pid)
154 convertUidPidToPath(path, sizeof(path), uid, pid);
220 pid_t pid;
224 while ((pid = getOneAppProcess(uid, initialPid, &ctx)) >= 0) {
226 if (pid == 0) {
229 SLOGW("Yikes, we've been told to kill pid 0! How about we don't do that.");
232 if (pid != initialPid) {
237 SLOGI("Killing pid %d in uid %d as part of process group %d", pid, uid, initialPid);
239 int ret = kill(pid, signal);
241 SLOGW("failed to kill pid %d: %s", pid, strerror(errno));
271 SLOGV("Killed process group uid %d pid %d in %" PRId64 "ms, %d procs remain", uid, initialPid,
330 char pid[PROCESSGROUP_MAX_PID_LEN + 1] = {0};
331 int len = snprintf(pid, sizeof(pid), "%d", initialPid);
333 ret = write(fd, pid, len);
336 SLOGE("failed to write '%s' to %s: %s", pid, path, strerror(errno));