From e2daa07ca52e0dddb1a9f40b1c8fc9bab4e619b2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Dec 2016 20:29:07 +0100 Subject: util-lib: rework rename_process() to be able to make use of PR_SET_MM_ARG_START PR_SET_MM_ARG_START allows us to relatively cleanly implement process renaming. However, it's only available with privileges. Hence, let's try to make use of it, and if we can't fall back to the traditional way of overriding argv[0]. This removes size restrictions on the process name shown in argv[] at least for privileged processes. --- src/basic/process-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/basic/process-util.h') diff --git a/src/basic/process-util.h b/src/basic/process-util.h index e904feed0..33c6637a4 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -67,7 +67,7 @@ void sigkill_waitp(pid_t *pid); int kill_and_sigcont(pid_t pid, int sig); -void rename_process(const char name[8]); +int rename_process(const char name[]); #endif // 0 int is_kernel_thread(pid_t pid); -- cgit v1.2.3