]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-process-util.c
util-lib: rework rename_process() to be able to make use of PR_SET_MM_ARG_START
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Dec 2016 19:29:07 +0000 (20:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Dec 2016 17:29:30 +0000 (18:29 +0100)
commit9bfaffd5a9c138b0bbdfb452b3f4435746f2d18b
tree16167597e9a372638ecbd6f8351036d4df3ed033
parente932f5407ef5ad05d25d7dfefa4cda0fe81cc346
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.c
src/basic/process-util.h
src/test/test-process-util.c