Skip to content

Commit cf13eaa

Browse files
committed
dbus: add AttachProcessesToUnit
Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 6b6ee9e commit cf13eaa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dbus/methods.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,3 +862,8 @@ func (c *Conn) FreezeUnit(ctx context.Context, unit string) error {
862862
func (c *Conn) ThawUnit(ctx context.Context, unit string) error {
863863
return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ThawUnit", 0, unit).Store()
864864
}
865+
866+
// AttachProcessesToUnit moves existing processes, identified by pids, into an existing systemd unit.
867+
func (c *Conn) AttachProcessesToUnit(ctx context.Context, unit, subcgroup string, pids []uint32) error {
868+
return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.AttachProcessesToUnit", 0, unit, subcgroup, pids).Store()
869+
}

0 commit comments

Comments
 (0)