process-util: introduce proc_set_comm() helper

This operation is done at a bunch of places, let's add a type-safe
helper for it.
This commit is contained in:
Lennart Poettering
2026-07-13 15:39:16 +02:00
parent d3c0348c8b
commit 0e077d3eea
6 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -3567,7 +3567,7 @@ static int run_systemd(int argc, char *argv[]) {
* reexecution we are then called 'systemd'. That is confusing, hence let's call us systemd
* right-away. */
program_invocation_short_name = systemd;
(void) prctl(PR_SET_NAME, systemd);
(void) proc_set_comm(systemd);
/* Save the original command line */
save_argc_argv(argc, argv);