Lines Matching defs:pid
38 static bool ignore_proc(pid_t pid, bool warn_rootfs) {
47 if (pid == 1)
50 r = get_process_uid(pid, &uid);
58 p = procfs_file_alloca(pid, "cmdline");
76 r = pid_from_same_root_fs(pid);
80 get_process_comm(pid, &comm);
86 "system instead.", pid, strna(comm));
115 pid_t pid;
117 pid = waitpid(-1, NULL, WNOHANG);
118 if (pid == 0)
120 if (pid < 0) {
128 (void) set_remove(pids, PID_TO_PTR(pid));
177 pid_t pid;
184 if (parse_pid(d->d_name, &pid) < 0)
187 if (ignore_proc(pid, sig == SIGKILL && !in_initrd()))
193 get_process_comm(pid, &s);
194 log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s));
197 if (kill(pid, sig) >= 0) {
199 r = set_put(pids, PID_TO_PTR(pid));
204 log_warning_errno(errno, "Could not kill %d: %m", pid);
218 if (get_ctty_devnr(pid, NULL) >= 0)
219 kill(pid, SIGHUP);