chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
commite2daa07ca52e0dddb1a9f40b1c8fc9bab4e619b2
tree1bab596036fa57db39598692795a7193b657ad6c
parentc1a072fc4997f736c2c7cd9716ea2a3973c9704a
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