chiark / gitweb /
core: fix support for transient resource limit properties
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Feb 2016 20:37:28 +0000 (21:37 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 17 May 2017 13:22:15 +0000 (15:22 +0200)
commite1a2012e9c85aba47a92025f9f7920b2d8f36fc6
tree1a749f12dab2b589e77d51368485524b37abca53
parentda9c99f94c4f13ac9e19c41b67c1b8fac3f69d6b
core: fix support for transient resource limit properties

Make sure we can properly process resource limit properties. Specifically, allow transient configuration of both the
soft and hard limit, the same way from the unit files. Previously, only the the hard rlimits could be configured but
they'd implicitly spill into the soft hard rlimits.

This also updates the client-side code to be able to parse hard/soft resource limit specifications. Since we need to
serialize two properties in bus_append_unit_property_assignment() now, the marshalling of the container around it is
now moved into the function itself. This has the benefit of shortening the calling code.

As a side effect this now beefs up the rlimit parser of "systemctl set-property" to understand time and disk sizes
where that's appropriate.
src/shared/bus-util.c