/systemd/src/nspawn/ |
H A D | nspawn-cgroup.h | 25 int chown_cgroup(pid_t pid, uid_t uid_shift); 26 int sync_cgroup(pid_t pid, bool unified_requested); 27 int create_subcgroup(pid_t pid, bool unified_requested);
|
H A D | nspawn-network.h | 26 int setup_veth(const char *machine_name, pid_t pid, char iface_name[IFNAMSIZ], bool bridge); 27 int setup_veth_extra(const char *machine_name, pid_t pid, char **pairs); 31 int setup_macvlan(const char *machine_name, pid_t pid, char **ifaces); 32 int setup_ipvlan(const char *machine_name, pid_t pid, char **ifaces); 34 int move_network_interfaces(pid_t pid, char **ifaces);
|
H A D | nspawn-register.h | 28 int register_machine(const char *machine_name, pid_t pid, const char *directory, sd_id128_t uuid, int local_ifindex, const char *slice, CustomMount *mounts, unsigned n_mounts, int kill_signal, char **properties, bool keep_unit, const char *service); 29 int terminate_machine(pid_t pid);
|
H A D | nspawn-cgroup.c | 32 int chown_cgroup(pid_t pid, uid_t uid_shift) { argument 38 r = cg_pid_get_path(NULL, pid, &path); 67 int sync_cgroup(pid_t pid, bool unified_requested) { argument 69 char tree[] = "/tmp/unifiedXXXXXX", pid_string[DECIMAL_STR_MAX(pid) + 1]; 86 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, pid, &cgroup); 88 return log_error_errno(r, "Failed to get control group of " PID_FMT ": %m", pid); 108 sprintf(pid_string, PID_FMT, pid); 121 int create_subcgroup(pid_t pid, bool unified_requested) { argument 151 r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, child, pid);
|
H A D | nspawn-stub-pid1.c | 41 pid_t pid; local 50 pid = fork(); 51 if (pid < 0) 52 return log_error_errno(errno, "Failed to fork child pid: %m"); 54 if (pid == 0) { 99 if (si.si_pid == pid || current_usec >= quit_usec) { 111 if (si.si_pid == pid && si.si_code == CLD_EXITED) 164 /* (void) kill_and_sigcont(pid, SIGTERM); */
|
/systemd/src/basic/ |
H A D | process-util.h | 33 #define procfs_file_alloca(pid, field) \ 35 pid_t _pid_ = (pid); \ 46 int get_process_state(pid_t pid); 47 int get_process_comm(pid_t pid, char **name); 48 int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line); 49 int get_process_exe(pid_t pid, char **name); 50 int get_process_uid(pid_t pid, uid_t *uid); 51 int get_process_gid(pid_t pid, gid_t *gid); 52 int get_process_capeff(pid_t pid, char **capeff); 53 int get_process_cwd(pid_t pid, cha [all...] |
H A D | process-util.c | 57 int get_process_state(pid_t pid) { argument 63 assert(pid >= 0); 65 p = procfs_file_alloca(pid, "stat"); 85 int get_process_comm(pid_t pid, char **name) { argument 90 assert(pid >= 0); 92 p = procfs_file_alloca(pid, "comm"); 101 int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line) { argument 108 assert(pid >= 0); 110 p = procfs_file_alloca(pid, "cmdline"); 184 h = get_process_comm(pid, 228 is_kernel_thread(pid_t pid) argument 260 get_process_capeff(pid_t pid, char **capeff) argument 291 get_process_exe(pid_t pid, char **name) argument 310 get_process_id(pid_t pid, const char *field, uid_t *uid) argument 347 get_process_uid(pid_t pid, uid_t *uid) argument 351 get_process_gid(pid_t pid, gid_t *gid) argument 356 get_process_cwd(pid_t pid, char **cwd) argument 366 get_process_root(pid_t pid, char **root) argument 376 get_process_environ(pid_t pid, char **env) argument 418 get_process_ppid(pid_t pid, pid_t *_ppid) argument 463 wait_for_terminate(pid_t pid, siginfo_t *status) argument 500 wait_for_terminate_and_warn(const char *name, pid_t pid, bool check_exit_code) argument 530 sigkill_wait(pid_t *pid) argument 540 kill_and_sigcont(pid_t pid, int sig) argument 551 getenv_for_pid(pid_t pid, const char *field, char **_value) argument 608 pid_is_unwaited(pid_t pid) argument 623 pid_is_alive(pid_t pid) argument 641 pid_from_same_root_fs(pid_t pid) argument 751 pid_t pid; local [all...] |
H A D | audit-util.h | 28 int audit_session_from_pid(pid_t pid, uint32_t *id); 29 int audit_loginuid_from_pid(pid_t pid, uid_t *uid);
|
H A D | audit-util.c | 34 int audit_session_from_pid(pid_t pid, uint32_t *id) { argument 47 p = procfs_file_alloca(pid, "sessionid"); 64 int audit_loginuid_from_pid(pid_t pid, uid_t *uid) { argument 72 p = procfs_file_alloca(pid, "loginuid");
|
H A D | cgroup-util.h | 116 int cg_pid_get_path(const char *controller, pid_t pid, char **path); 123 int cg_attach(const char *controller, const char *path, pid_t pid); 124 int cg_attach_fallback(const char *controller, const char *path, pid_t pid); 125 int cg_create_and_attach(const char *controller, const char *path, pid_t pid); 150 int cg_pid_get_path_shifted(pid_t pid, const char *cached_root, char **cgroup); 152 int cg_pid_get_session(pid_t pid, char **session); 153 int cg_pid_get_owner_uid(pid_t pid, uid_t *uid); 154 int cg_pid_get_unit(pid_t pid, char **unit); 155 int cg_pid_get_user_unit(pid_t pid, char **unit); 156 int cg_pid_get_machine_name(pid_t pid, cha [all...] |
/systemd/src/journal/ |
H A D | test-journal-syslog.c | 26 const char *ident, const char*pid, int ret) { 35 assert_se(pid == pid2 || streq_ptr(pid, pid2));
|
H A D | journald-syslog.h | 26 size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid);
|
H A D | journald-wall.c | 47 get_process_comm(ucred->pid, &ident_buf); 51 if (asprintf(&l_buf, "%s["PID_FMT"]: %s", strempty(identifier), ucred->pid, message) < 0) {
|
/systemd/src/core/ |
H A D | killall.c | 38 static bool ignore_proc(pid_t pid, bool warn_rootfs) { argument 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; local 117 pid = waitpid(-1, NULL, WNOHANG); 118 if (pid 177 pid_t pid; local [all...] |
/systemd/src/test/ |
H A D | test-process-util.c | 98 pid_t pid; local 100 pid = fork(); 101 assert_se(pid >= 0); 102 if (pid == 0) { 107 waitpid(pid, &status, 0); 108 assert_se(!pid_is_unwaited(pid)); 115 pid_t pid; local 117 pid = fork(); 118 assert_se(pid >= 0); 119 if (pid [all...] |
H A D | test-cgroup-util.c | 189 pid_t pid; local 196 r = parse_pid(de->d_name, &pid); 200 if (is_kernel_thread(pid)) 203 cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, pid, &path); 204 cg_pid_get_path_shifted(pid, NULL, &path_shifted); 205 cg_pid_get_owner_uid(pid, &uid); 206 cg_pid_get_session(pid, &session); 207 cg_pid_get_unit(pid, &unit); 208 cg_pid_get_user_unit(pid, &user_unit); 209 cg_pid_get_machine_name(pid, [all...] |
/systemd/src/shared/ |
H A D | utmp-wtmp.h | 35 int utmp_put_dead_process(const char *id, pid_t pid, int code, int status); 36 int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line, int ut_type, const char *user); 59 static inline int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { argument 62 static inline int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line, int ut_type, const char *user) { argument
|
H A D | pager.c | 173 pid_t pid; local 194 pid = fork(); 195 if (pid < 0) 198 if (pid == 0) { 217 r = wait_for_terminate(pid, &status);
|
/systemd/src/systemd/ |
H A D | sd-login.h | 54 int sd_pid_get_session(pid_t pid, char **session); 61 int sd_pid_get_owner_uid(pid_t pid, uid_t *uid); 65 int sd_pid_get_unit(pid_t pid, char **unit); 70 int sd_pid_get_user_unit(pid_t pid, char **unit); 73 int sd_pid_get_slice(pid_t pid, char **slice); 76 int sd_pid_get_user_slice(pid_t pid, char **slice); 80 int sd_pid_get_machine_name(pid_t pid, char **machine); 84 int sd_pid_get_cgroup(pid_t pid, char **cgroup); 116 int sd_peer_get_cgroup(pid_t pid, char **cgroup);
|
H A D | sd-daemon.h | 184 MAINPID=... The main pid of a daemon, in case systemd did not 243 int sd_pid_notify(pid_t pid, int unset_environment, const char *state); 249 int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _sd_printf_(3,4); 256 int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds);
|
/systemd/src/quotacheck/ |
H A D | quotacheck.c | 77 pid_t pid; local 105 pid = fork(); 106 if (pid < 0) { 109 } else if (pid == 0) { 121 r = wait_for_terminate_and_warn("quotacheck", pid, true);
|
/systemd/src/import/ |
H A D | import-common.c | 75 pid_t pid; local 84 pid = fork(); 85 if (pid < 0) 88 if (pid == 0) { 148 *ret = pid; 155 pid_t pid; local 164 pid = fork(); 165 if (pid < 0) 168 if (pid == 0) { 222 *ret = pid; [all...] |
/systemd/src/bootchart/ |
H A D | store.c | 74 static int pid_cmdline_strscpy(int procfd, char *buffer, size_t buf_len, int pid) { argument 79 sprintf(filename, "%d/cmdline", pid); 209 int pid; local 215 pid = atoi(ent->d_name); 217 if (pid >= MAXPIDS) 223 if (ps->pid == pid) 228 if (ps->pid != pid) { 238 ps->pid [all...] |
/systemd/src/login/ |
H A D | inhibit.c | 80 unsigned int uid, pid; local 100 while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) { 106 get_process_comm(pid, &comm); 113 who, uid, strna(u), pid, strna(comm), 254 pid_t pid; local 268 pid = fork(); 269 if (pid < 0) { 274 if (pid == 0) { 287 r = wait_for_terminate_and_warn(argv[optind], pid, true);
|
/systemd/src/remount-fs/ |
H A D | remount-fs.c | 77 pid_t pid; local 89 pid = fork(); 90 if (pid < 0) { 95 if (pid == 0) { 116 k = hashmap_put(pids, PID_TO_PTR(pid), s);
|