diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-12-06 20:29:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-14 18:29:30 +0100 |
commit | 9bfaffd5a9c138b0bbdfb452b3f4435746f2d18b (patch) | |
tree | 16167597e9a372638ecbd6f8351036d4df3ed033 /src/basic/process-util.h | |
parent | e932f5407ef5ad05d25d7dfefa4cda0fe81cc346 (diff) |
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.
Diffstat (limited to 'src/basic/process-util.h')
-rw-r--r-- | src/basic/process-util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/process-util.h b/src/basic/process-util.h index 89dfeb4d6a..d378901399 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -64,7 +64,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[]); int is_kernel_thread(pid_t pid); int getenv_for_pid(pid_t pid, const char *field, char **_value); |