summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-daemon/sd-daemon.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-14 23:52:29 +0200
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:13:01 +0200
commitdaf3399a4b667bcdb45757608989a60eeec4a4fe (patch)
tree3f2d6e860455ea4a3591fb108b3ce84451e62b83 /src/libelogind/sd-daemon/sd-daemon.c
parentd046fa2e88ab824e7dc3e32172328357779ab0f6 (diff)
util-lib: rework get_process_cmdline() (#3529)
This reworks get_process_cmdline() quite substantially, fixing the following: - Fixes: https://github.com/elogind/elogind/pull/3512/commits/a4e3bf4d7ac2de51191ce136ee9361ba319e106c#r66837630 - The passed max_length is also applied to the "comm" name, if comm_fallback is set. - The right thing happens if max_length == 1 is specified - when the cmdline "foobar" is abbreviated to 6 characters the result is not "foobar" instead of "foo...". - trailing whitespace are removed before the ... suffix is appended. The 7 character abbreviation of "foo barz" is hence "foo..." instead of "foo ...". - leading whitespace are suppressed from the cmdline - a comprehensive test case is added
Diffstat (limited to 'src/libelogind/sd-daemon/sd-daemon.c')
0 files changed, 0 insertions, 0 deletions