I would like to be able to create a one-time temporary group in hierarchy. For example:
#!/bin/sh run_with_csubgroup /sys/fs/cgroup/group/subgroup/
Which creates group say
/sys/fs/cgroup/group/subgroup/5G7ds/ (5G7ds is one-time name - it might be ID or anything).
I would like to delete the group automatically but I don't know how to do it easily and prone to say TERM signal (from actidental C-c).
Is there a way to do it? I'm using Gentoo+systemd.