Home
last modified time | relevance | path

Searched refs:pids (Results 1 – 24 of 24) sorted by relevance

/systemd-251/src/shared/
Dbus-unit-procs.c18 Hashmap *pids; /* PID → process name */ member
107 return hashmap_ensure_put(&cg->pids, &trivial_hash_ops, PID_TO_PTR(pid), (void*) name); in add_process()
122 hashmap_free(cg->pids); in remove_cgroup()
152 if (!hashmap_isempty(cg->pids)) { in dump_processes()
155 pid_t *pids; in dump_processes() local
160 pids = newa(pid_t, hashmap_size(cg->pids)); in dump_processes()
162 HASHMAP_FOREACH_KEY(name, pidp, cg->pids) in dump_processes()
163 pids[n++] = PTR_TO_PID(pidp); in dump_processes()
165 assert(n == hashmap_size(cg->pids)); in dump_processes()
166 typesafe_qsort(pids, n, pid_compare_func); in dump_processes()
[all …]
Dkillall.c81 static void log_children_no_yet_killed(Set *pids) { in log_children_no_yet_killed() argument
86 SET_FOREACH(p, pids) { in log_children_no_yet_killed()
103 static int wait_for_children(Set *pids, sigset_t *mask, usec_t timeout) { in wait_for_children() argument
111 if (set_isempty(pids)) in wait_for_children()
142 (void) set_remove(pids, PID_TO_PTR(pid)); in wait_for_children()
147 SET_FOREACH(p, pids) { in wait_for_children()
157 set_remove(pids, p); in wait_for_children()
160 if (set_isempty(pids)) in wait_for_children()
165 log_children_no_yet_killed(pids); in wait_for_children()
171 return set_size(pids); in wait_for_children()
[all …]
Dcgroup-show.c33 pid_t pids[], in show_pid_array() argument
46 typesafe_qsort(pids, n_pids, pid_compare_func); in show_pid_array()
50 if (pids[i] == pids[j]) in show_pid_array()
52 pids[++j] = pids[i]; in show_pid_array()
55 pid_width = DECIMAL_STR_WIDTH(pids[j]); in show_pid_array()
68 (void) get_process_cmdline(pids[i], n_columns, in show_pid_array()
77 … printf("%s%*"PID_PRI" %s%s\n", ansi_grey(), pid_width, pids[i], strna(t), ansi_normal()); in show_pid_array()
88 _cleanup_free_ pid_t *pids = NULL; in show_cgroup_one_by_path() local
120 if (!GREEDY_REALLOC(pids, n + 1)) in show_cgroup_one_by_path()
123 pids[n++] = pid; in show_cgroup_one_by_path()
[all …]
Dexec-util.c92 _cleanup_hashmap_free_free_ Hashmap *pids = NULL; in do_execute() local
110 pids = hashmap_new(NULL); in do_execute()
111 if (!pids) in do_execute()
145 r = hashmap_put(pids, PID_TO_PTR(pid), t); in do_execute()
175 while (!hashmap_isempty(pids)) { in do_execute()
179 pid = PTR_TO_PID(hashmap_first_key(pids)); in do_execute()
182 t = hashmap_remove(pids, PID_TO_PTR(pid)); in do_execute()
/systemd-251/src/remount-fs/
Dremount-fs.c48 static int do_remount(const char *path, bool force_rw, Hashmap **pids) { in do_remount() argument
70 return track_pid(pids, path, pid); in do_remount()
74 _cleanup_hashmap_free_free_ Hashmap *pids = NULL; in run() local
102 r = do_remount(me->mnt_dir, false, &pids); in run()
117 r = do_remount("/", true, &pids); in run()
124 while (!hashmap_isempty(pids)) { in run()
135 s = hashmap_remove(pids, PID_TO_PTR(si.si_pid)); in run()
/systemd-251/src/tty-ask-password-agent/
Dtty-ask-password-agent.c581 static void terminate_agents(Set *pids) { in terminate_agents() argument
590 SET_FOREACH(p, pids) in terminate_agents()
599 while (!set_isempty(pids)) { in terminate_agents()
607 set_remove(pids, PID_TO_PTR(status.si_pid)); in terminate_agents()
623 SET_FOREACH(p, pids) { in terminate_agents()
630 _cleanup_set_free_ Set *pids = NULL; in ask_on_consoles() local
640 pids = set_new(NULL); in ask_on_consoles()
641 if (!pids) in ask_on_consoles()
654 if (set_put(pids, PID_TO_PTR(pid)) < 0) in ask_on_consoles()
669 set_remove(pids, PID_TO_PTR(status.si_pid)); in ask_on_consoles()
[all …]
/systemd-251/src/test/
Dtest-watch-pid.c34 assert_se(set_isempty(a->pids)); in main()
38 assert_se(set_isempty(b->pids)); in main()
42 assert_se(set_isempty(c->pids)); in main()
/systemd-251/src/core/
Ddbus-unit.c1235 static int append_process(sd_bus_message *reply, const char *p, pid_t pid, Set *pids) { in append_process() argument
1242 r = set_put(pids, PID_TO_PTR(pid)); in append_process()
1269 static int append_cgroup(sd_bus_message *reply, const char *p, Set *pids) { in append_cgroup() argument
1299 r = append_process(reply, p, pid, pids); in append_cgroup()
1323 r = append_cgroup(reply, j, pids); in append_cgroup()
1333 _cleanup_set_free_ Set *pids = NULL; in bus_unit_method_get_processes() local
1344 pids = set_new(NULL); in bus_unit_method_get_processes()
1345 if (!pids) in bus_unit_method_get_processes()
1357 r = append_cgroup(reply, u->cgroup_path, pids); in bus_unit_method_get_processes()
1365 r = append_process(reply, NULL, pid, pids); in bus_unit_method_get_processes()
[all …]
Dscope.c148 if (set_isempty(UNIT(s)->pids) && in scope_verify()
254 if (u->pids) { in scope_coldplug()
257 SET_FOREACH(pidp, u->pids) { in scope_coldplug()
388 r = unit_attach_pids_to_cgroup(u, u->pids, NULL); in scope_start()
480 SET_FOREACH(pidp, u->pids) in scope_serialize()
524 r = set_ensure_put(&u->pids, NULL, PID_TO_PTR(pid)); in scope_deserialize_item()
Dcgroup.h275 int unit_attach_pids_to_cgroup(Unit *u, Set *pids, const char *suffix_path);
Dunit.c2796 r = set_ensure_allocated(&u->pids, NULL); in unit_watch_pid()
2846 r = set_put(u->pids, PID_TO_PTR(pid)); in unit_watch_pid()
2880 (void) set_remove(u->pids, PID_TO_PTR(pid)); in unit_unwatch_pid()
2886 while (!set_isempty(u->pids)) in unit_unwatch_all_pids()
2887 unit_unwatch_pid(u, PTR_TO_PID(set_first(u->pids))); in unit_unwatch_all_pids()
2889 u->pids = set_free(u->pids); in unit_unwatch_all_pids()
2903 SET_FOREACH(e, u->pids) { in unit_tidy_watch_pids()
Dcgroup.c2288 int unit_attach_pids_to_cgroup(Unit *u, Set *pids, const char *suffix_path) { in unit_attach_pids_to_cgroup() argument
2299 if (set_isempty(pids)) in unit_attach_pids_to_cgroup()
2320 SET_FOREACH(pidp, pids) { in unit_attach_pids_to_cgroup()
2941 if (!set_isempty(u->pids)) in unit_synthesize_cgroup_empty_event()
Dunit.h248 Set *pids; member
Ddbus-manager.c2978 SD_BUS_ARGS("s", unit_name, "s", subcgroup, "au", pids),
/systemd-251/src/userdb/
Duserdbd-manager.c161 char pids[DECIMAL_STR_MAX(pid_t)]; in start_one_worker() local
189 xsprintf(pids, PID_FMT, pid); in start_one_worker()
190 if (setenv("LISTEN_PID", pids, 1) < 0) { in start_one_worker()
/systemd-251/units/
Duser@.service.in24 Delegate=pids memory
Dsystemd-udevd.service.in19 Delegate=pids
/systemd-251/test/test-umount/
Drhbug-1554943.mountinfo19 36 25 0:33 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,pids
/systemd-251/test/units/
Dtestsuite-19.sh16 grep -q pids /sys/fs/cgroup/system.slice/test2.service/cgroup.controllers
/systemd-251/shell-completion/zsh/
D_coredumpctl22 _describe -V -t pids 'coredumps' _dumps
/systemd-251/docs/
DCGROUP_DELEGATION.md125 `/sys/fs/cgroup/memory/foo/bar/`, `/sys/fs/cgroup/pids/foo/bar/`, and so on.
352 * on cgroup v1: `cpu`, `cpuacct`, `blkio`, `memory`, `devices`, `pids`
353 * on cgroup v2: `cpu`, `io`, `memory`, `pids`
/systemd-251/test/
Dtest-functions1382 if [[ -n "$pids" ]]; then
1384 for pid in $pids; do
/systemd-251/
DREADME35 ≥ 4.5 for pids controller in cgroup v2
DNEWS8191 hierarchy has been added, so that the "memory", "pids" and "io" are
8656 setting that exposes the "pids" cgroup controller on systemd
8670 only has an effect if the "pids" cgroup controller is
8810 * Support for the "pids" cgroup controller has been added. It