]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/cgcreate: add -p <pid> support for systemd scope
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 27 Apr 2023 12:38:42 +0000 (12:38 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 28 Apr 2023 20:44:08 +0000 (14:44 -0600)
commit541609c0e4dc9b3f355ca7a62ff28132cfb8eb11
tree93e206cd31d53e206329fd072a508e0b116997b3
parent3515a9eb9bc3eb306aca7c2e6f87ed92c904a7be
tools/cgcreate: add -p <pid> support for systemd scope

Currently, an idle_thread is created for the transient systemd scope by
default, it works fine, when the slice/scope creation is treated in par
to create of traditional cgroup, but the user may wish to create a
slice/scope, with a process of their choice, instead of a default idle
thread.  Add support to pass task pid via '-p/--pid' option, while
creating a systemd slice/scope.

 # ./src/tools/cgcreate -c -gcpu:foo.slice/bar.scope --pid=4253

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/tools/cgcreate.c