]> git.ipfire.org Git - thirdparty/dbus.git/commit
spawn-unix: Don't log an error if unable to reset Linux OOM score
authorSimon McVittie <smcv@collabora.com>
Mon, 21 Feb 2022 16:02:13 +0000 (16:02 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 25 Feb 2022 14:57:18 +0000 (14:57 +0000)
commitc32b5cc4ed4ec04cd8554098b67cdff640edf927
tree62f28229f9e1c0295c629240292e84845849d109
parente7a4123d6e4096a22a6b32f9a84747ab95590577
spawn-unix: Don't log an error if unable to reset Linux OOM score

We cannot safely log between fork() and exec() because it isn't an
async-signal-safe operation (in particular it might allocate memory).

We also don't want to treat a failure here as a real problem, because
it might legitimately not work: in a system dbus-daemon that has dropped
privileges from root, the pseudo-file representing this process parameter
remains owned by root and cannot be altered by the unprivileged user.

For the main use-case for this operation, the system dbus-daemon, we
have another opportunity to do this in the dbus-daemon-launch-helper
(see the previous commit).

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 7ee72a27957be5d3436beaa02ccd01b9ce042962)
dbus/dbus-spawn.c